net.sourceforge.pmd.rules.sunsecure
public abstract class AbstractSunSecureRule extends AbstractRule
Method Summary | |
---|---|
protected String | getFirstNameImage(SimpleNode n)
Gets the image of the first ASTName node found by {@link SimpleNode#getFirstChildOfType(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, ASTMethodDeclaration node)
TODO modify usages to use symbol table
Tells if the variable name is a local variable declared in the method.
|
Parameters: n the node to search
Returns: the image of the first ASTName or null
Parameters: ret a return statement to evaluate
Returns: the name of the variable associated or null
if it cannot be detected
Parameters: varName the name of the field to search typeDeclaration the type declaration
Returns: true
if there is a field in the type declaration named varName, false
in other case
Parameters: vn the variable name node the ASTMethodDeclaration where the local variable name will be searched
Returns: true
if the method declaration contains any local variable named vn and false
in other case