Class AbstractSunSecureRule

    • Constructor Detail

      • AbstractSunSecureRule

        public AbstractSunSecureRule()
        Deprecated.
    • Method Detail

      • isField

        protected final boolean isField​(String varName,
                                        ASTAnyTypeDeclaration typeDeclaration)
        Deprecated.
        Tells if the type declaration has a field with varName.
        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
      • getReturnedVariableName

        protected final String getReturnedVariableName​(ASTReturnStatement ret)
        Deprecated.
        Gets the name of the variable returned. Some examples:
        for this.foo returns foo
        for foo returns foo
        for foo.bar returns foo.bar
        Parameters:
        ret - a return statement to evaluate
        Returns:
        the name of the variable associated or null if it cannot be detected
      • isLocalVariable

        protected boolean isLocalVariable​(String vn,
                                          Node node)
        Deprecated.
        TODO modify usages to use symbol table Tells if the variable name is a local variable declared in the method.
        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
      • getFirstNameImage

        protected String getFirstNameImage​(Node n)
        Deprecated.
        Gets the image of the ASTName node found by Node.getFirstDescendantOfType(Class) if it is the greatgrandchild of the given node. E.g.
         n = Expression || StatementExpression
               PrimaryExpression
                 PrimaryPrefix
                   Name
         
        Parameters:
        n - the node to search
        Returns:
        the image of the first ASTName or null