Class JavaNameOccurrence
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.symboltable.JavaNameOccurrence
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.symboltable.NameOccurrence
public class JavaNameOccurrence extends java.lang.Object implements net.sourceforge.pmd.lang.symboltable.NameOccurrence
-
-
Constructor Summary
Constructors Constructor Description JavaNameOccurrence(JavaNode location, java.lang.String image)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getArgumentCount()
java.lang.String
getImage()
JavaNode
getLocation()
net.sourceforge.pmd.lang.symboltable.NameOccurrence
getNameForWhichThisIsAQualifier()
int
hashCode()
boolean
isMethodOrConstructorInvocation()
boolean
isMethodReference()
boolean
isOnLeftHandSide()
boolean
isOnRightHandSide()
boolean
isPartOfQualifiedName()
boolean
isSelfAssignment()
Assert it the occurrence is a self assignment such as:i += 3;
boolean
isThisOrSuper()
Simply return true is the image is equal to keyword 'this' or 'super'.void
setArgumentCount(int count)
void
setIsMethodOrConstructorInvocation()
void
setNameWhichThisQualifies(net.sourceforge.pmd.lang.symboltable.NameOccurrence qualifiedName)
java.lang.String
toString()
boolean
useThisOrSuper()
Simply return if the image start with keyword 'this' or 'super'.
-
-
-
Constructor Detail
-
JavaNameOccurrence
public JavaNameOccurrence(JavaNode location, java.lang.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 interfacenet.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;
- Returns:
- 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'.- Returns:
- return true if image equal to 'this' or 'super'.
-
useThisOrSuper
public boolean useThisOrSuper()
Simply return if the image start with keyword 'this' or 'super'.- Returns:
- true, if keyword is used, false otherwise.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getImage
public java.lang.String getImage()
- Specified by:
getImage
in interfacenet.sourceforge.pmd.lang.symboltable.NameOccurrence
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-