public abstract class AbstractSunSecureRule extends AbstractRule
LOWEST_PRIORITY, PRIORITIES| Constructor and Description |
|---|
AbstractSunSecureRule() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
getFirstNameImage(SimpleNode n)
Gets the image of the first ASTName node found by
SimpleNode.getFirstChildOfType(Class) |
protected java.lang.String |
getReturnedVariableName(ASTReturnStatement ret)
Gets the name of the variable returned.
|
protected boolean |
isField(java.lang.String varName,
ASTTypeDeclaration typeDeclaration)
Tells if the type declaration has a field with varName.
|
protected boolean |
isLocalVariable(java.lang.String vn,
SimpleNode node)
TODO modify usages to use symbol table
Tells if the variable name is a local variable declared in the method.
|
addViolation, addViolation, addViolation, addViolationWithMessage, apply, getDeclaringType, importsPackage, isQualifiedName, 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, addProperties, addProperty, addRuleChainVisit, asFixedMap, asFixedMap, end, equals, getBooleanProperties, getBooleanProperty, getBooleanProperty, getDescription, getDoubleProperties, getDoubleProperty, getDoubleProperty, getExample, getExamples, getExternalInfoUrl, getIntProperties, getIntProperty, getIntProperty, getMessage, getName, getPriority, getPriorityName, getProperties, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, getStringProperties, getStringProperty, getStringProperty, getTypeProperties, getTypeProperty, hashCode, hasProperty, include, propertiesByName, propertyDescriptorFor, setDescription, setExternalInfoUrl, setInclude, setMessage, setName, setPriority, setProperties, setProperty, setRuleClass, setRuleSetName, setSince, setUsesDFA, setUsesTypeResolution, start, usesDFA, usesRuleChain, usesTypeResolutionprotected final boolean isField(java.lang.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 java.lang.String getReturnedVariableName(ASTReturnStatement ret)
ret - a return statement to evaluatenull if it cannot be detectedprotected boolean isLocalVariable(java.lang.String vn,
SimpleNode 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 java.lang.String getFirstNameImage(SimpleNode n)
SimpleNode.getFirstChildOfType(Class)n - the node to searchnull