public abstract class AbstractSunSecureRule extends AbstractJavaRule
propertyDescriptors, propertyValuesByDescriptor
VIOLATION_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 first ASTName node found by
Node.getFirstDescendantOfType(Class) |
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, visitAll
addExample, 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, usesTypeResolution
copyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, useDefaultValueFor, usesDefaultValues
protected 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)
n
- the node to searchnull
Copyright © 2002-2015 InfoEther. All Rights Reserved.