Class JavaNameOccurrence

  • All Implemented Interfaces:

    public class JavaNameOccurrence
    extends Object
    implements net.sourceforge.pmd.lang.symboltable.NameOccurrence
    • Constructor Detail

      • JavaNameOccurrence

        public JavaNameOccurrence​(JavaNode location,
                                  String image)
    • Method Detail

      • setIsMethodOrConstructorInvocation

        public void setIsMethodOrConstructorInvocation()
      • setArgumentCount

        public void setArgumentCount​(int count)
      • getArgumentCount

        public int getArgumentCount()
      • isMethodOrConstructorInvocation

        public boolean isMethodOrConstructorInvocation()
      • isMethodReference

        public boolean isMethodReference()
      • setNameWhichThisQualifies

        public void setNameWhichThisQualifies​(net.sourceforge.pmd.lang.symboltable.NameOccurrence qualifiedName)
      • getNameForWhichThisIsAQualifier

        public net.sourceforge.pmd.lang.symboltable.NameOccurrence getNameForWhichThisIsAQualifier()
      • isPartOfQualifiedName

        public boolean isPartOfQualifiedName()
      • getLocation

        public JavaNode getLocation()
        Specified by:
        getLocation in interface net.sourceforge.pmd.lang.symboltable.NameOccurrence
      • isOnRightHandSide

        public boolean isOnRightHandSide()
      • isOnLeftHandSide

        public boolean isOnLeftHandSide()
      • isSelfAssignment

        public boolean isSelfAssignment()
        Assert it the occurrence is a self assignment such as: i += 3;
        true, if the occurrence is self-assignment, false, otherwise.
      • isThisOrSuper

        public boolean isThisOrSuper()
        Simply return true is the image is equal to keyword 'this' or 'super'.
        return true if image equal to 'this' or 'super'.
      • useThisOrSuper

        public boolean useThisOrSuper()
        Simply return if the image start with keyword 'this' or 'super'.
        true, if keyword is used, false otherwise.
      • hashCode

        public int hashCode()
        hashCode in class Object
      • getImage

        public String getImage()
        Specified by:
        getImage in interface net.sourceforge.pmd.lang.symboltable.NameOccurrence