Class JavaOperationQualifiedName
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.ast.JavaQualifiedName
-
- net.sourceforge.pmd.lang.java.qname.JavaOperationQualifiedName
-
- All Implemented Interfaces:
net.sourceforge.pmd.lang.ast.QualifiedName
public final class JavaOperationQualifiedName extends JavaQualifiedName
Specializes JavaQualifiedName for operations.- Since:
- 6.1.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intbuildHashCode()Computes the hashcode.protected java.lang.StringbuildToString()Construct the toString once.JavaTypeQualifiedNamegetClassName()java.lang.StringgetOperation()Returns the operation specific part of the name.booleanisClass()booleanisLambda()Returns true if this qualified name identifies a lambda expression.booleanisOperation()protected booleanstructurallyEquals(JavaQualifiedName qname)Returns true if the given qname is identical to this qname.-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.JavaQualifiedName
equals, getClasses, getClassSimpleName, getPackages, hashCode, isLocalClass, isUnnamedPackage, ofClass, ofString, toString
-
-
-
-
Method Detail
-
getClassName
public JavaTypeQualifiedName getClassName()
- Specified by:
getClassNamein interfacenet.sourceforge.pmd.lang.ast.QualifiedName- Specified by:
getClassNamein classJavaQualifiedName
-
isOperation
public boolean isOperation()
-
isClass
public boolean isClass()
-
isLambda
public boolean isLambda()
Returns true if this qualified name identifies a lambda expression.
-
getOperation
public java.lang.String getOperation()
Returns the operation specific part of the name. It identifies an operation in its namespace.- Overrides:
getOperationin classJavaQualifiedName- Returns:
- The operation string.
-
structurallyEquals
protected boolean structurallyEquals(JavaQualifiedName qname)
Description copied from class:JavaQualifiedNameReturns true if the given qname is identical to this qname. Performs a structural comparison. Used in the implementation ofJavaQualifiedName.equals(Object)after taking shortcuts.- Specified by:
structurallyEqualsin classJavaQualifiedName- Parameters:
qname- The other comparand. Can always be casted down to the subclass type in which this method is overridden
-
buildHashCode
protected int buildHashCode()
Description copied from class:JavaQualifiedNameComputes the hashcode. Called once, then cached. Since QualifiedNames are mostly used as the keys of a map, caching the hashcode makes sense.- Specified by:
buildHashCodein classJavaQualifiedName
-
buildToString
protected java.lang.String buildToString()
Description copied from class:JavaQualifiedNameConstruct the toString once. Called only once per instance- Specified by:
buildToStringin classJavaQualifiedName
-
-