JavaParserVisitor, net.sourceforge.pmd.properties.PropertySource, RuleArrayIsStoredDirectlyRule, MethodReturnsInternalArrayRulepublic abstract class AbstractSunSecureRule extends AbstractJavaRule
propertyDescriptors, propertyValuesByDescriptorVIOLATION_SUPPRESS_REGEX_DESCRIPTOR, VIOLATION_SUPPRESS_XPATH_DESCRIPTOR| Constructor | Description |
|---|---|
AbstractSunSecureRule() |
| Modifier and Type | Method | Description |
|---|---|---|
protected java.lang.String |
getFirstNameImage(net.sourceforge.pmd.lang.ast.Node n) |
Gets the image of the ASTName node found by
Node.getFirstDescendantOfType(Class) if it is the greatgrandchild
of the given node. |
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,
net.sourceforge.pmd.lang.ast.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, visit, visit, visit, visitAllcopyPropertyDescriptors, copyPropertyValues, definePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValuesaddExample, addRuleChainVisit, addRuleChainVisit, addViolation, addViolation, addViolation, addViolationWithMessage, addViolationWithMessage, addViolationWithMessage, deepCopy, deepCopyValuesTo, end, equals, getDescription, getExamples, getExternalInfoUrl, getLanguage, getMaximumLanguageVersion, getMessage, getMinimumLanguageVersion, getName, getParserOptions, getPriority, getRuleChainVisits, getRuleClass, getRuleSetName, getSince, hashCode, isDeprecated, isDfa, isMultifile, isRuleChain, isTypeResolution, setDeprecated, setDescription, setDfa, setExternalInfoUrl, setLanguage, setMaximumLanguageVersion, setMessage, setMinimumLanguageVersion, setMultifile, setName, setPriority, setRuleClass, setRuleSetName, setSince, setTypeResolution, setUsesDFA, setUsesMultifile, setUsesTypeResolution, start, usesDFA, usesMultifile, usesRuleChain, usesTypeResolutionclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitdefinePropertyDescriptor, dysfunctionReason, getPropertiesByPropertyDescriptor, getProperty, getPropertyDescriptor, getPropertyDescriptors, hasDescriptor, ignoredProperties, setProperty, setProperty, useDefaultValueFor, usesDefaultValuesprotected 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,
net.sourceforge.pmd.lang.ast.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 java.lang.String getFirstNameImage(net.sourceforge.pmd.lang.ast.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–2018 PMD. All rights reserved.