public abstract class AbstractSunSecureRule extends AbstractJavaRule
propertyDescriptors, propertyValuesByDescriptorVIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR| Constructor and Description |
|---|
AbstractSunSecureRule() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getFirstNameImage(Node n)
Gets the image of the ASTName node found by
Node.getFirstDescendantOfType(Class)
if it is the greatgrandchild of the given node. |
protected String |
getReturnedVariableName(ASTReturnStatement ret)
Gets the name of the variable returned.
|
protected boolean |
isField(String varName,
ASTTypeDeclaration typeDeclaration)
Tells if the type declaration has a field with varName.
|
protected boolean |
isLocalVariable(String vn,
Node node)
TODO modify usages to use symbol table Tells if the variable name is a
local variable declared in the method.
|
apply, getDeclaringType, importsPackage, isQualifiedName, isSuppressed, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visitAlladdExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, setDeprecated, setDescription, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setName, setPriority, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolutioncopyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValuesclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdefinePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValuesprotected final boolean isField(String varName, ASTTypeDeclaration typeDeclaration)
varName - the name of the field to searchtypeDeclaration - the type declarationtrue if there is a field in the type declaration
named varName, false in other caseprotected final String getReturnedVariableName(ASTReturnStatement ret)
ret - a return statement to evaluatenull if it
cannot be detectedprotected boolean isLocalVariable(String vn, Node node)
vn - the variable namenode - the ASTMethodDeclaration where the local variable name will be
searchedtrue if the method declaration contains any local
variable named vn and false in other caseprotected String getFirstNameImage(Node n)
Node.getFirstDescendantOfType(Class)
if it is the greatgrandchild of the given node.
E.g.
n = Expression || StatementExpression
PrimaryExpression
PrimaryPrefix
Name
n - the node to searchnullCopyright © 2002–2016 InfoEther. All rights reserved.