Class AstLocalVarSym

    • Field Detail

      • factory

        protected final net.sourceforge.pmd.lang.java.symbols.internal.ast.AstSymFactory factory
    • Method Detail

      • equals

        public boolean equals​(Object o)
        Description copied from interface: JElementSymbol
        Two symbols representing the same program element should be equal. So eg two JClassSymbol, even if their implementation class is different, should compare publicly observable properties (their binary name is enough). #hashCode() must of course be consistent with this contract.

        Symbols should only be compared using this method, never with ==, because their unicity is not guaranteed.

        Specified by:
        equals in interface JElementSymbol
        Parameters:
        o - Comparand
        Returns:
        True if the other is a symbol for the same program element
      • hashCode

        public int hashCode()
      • isFinal

        public boolean isFinal()
        Description copied from interface: JVariableSymbol
        Returns true if this declaration is declared final. This takes implicit modifiers into account.
        Specified by:
        isFinal in interface JVariableSymbol
      • getSimpleName

        public String getSimpleName()
        Description copied from interface: JElementSymbol
        Gets the name with which this declaration may be referred to, eg the name of the method, or the simple name of the class.
        Specified by:
        getSimpleName in interface JElementSymbol
        Returns:
        the name
      • getDeclaredAnnotations

        public org.pcollections.PSet<SymbolicValue.SymAnnot> getDeclaredAnnotations()
        Description copied from interface: AnnotableSymbol
        Return the valid symbolic annotations defined on this symbol. Annotations that could not be converted, eg because they are written with invalid code, are discarded, so this might not match the annotations on a node one to one.
        Specified by:
        getDeclaredAnnotations in interface AnnotableSymbol
      • getTypeSystem

        public TypeSystem getTypeSystem()
        Description copied from interface: JElementSymbol
        Returns the type system that created this symbol. The symbol uses this instance to create new types, for example to reflect its superclass.
        Specified by:
        getTypeSystem in interface JElementSymbol