Class JavaTypeQualifiedName
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.ast.JavaQualifiedName
-
- net.sourceforge.pmd.lang.java.qname.JavaTypeQualifiedName
-
- All Implemented Interfaces:
QualifiedName
@Deprecated public final class JavaTypeQualifiedName extends JavaQualifiedName
Deprecated.SpecialisesJavaQualifiedNamefor type names.- Since:
- 6.1.0
- Author:
- Clément Fournier
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected intbuildHashCode()Deprecated.Computes the hashcode.protected StringbuildToString()Deprecated.Construct the toString once.StringgetBinaryName()Deprecated.Returns the binary name of the type identified by this qualified name.List<String>getClassList()Deprecated.Returns the class specific part of the name.JavaTypeQualifiedNamegetClassName()Deprecated.StringgetClassSimpleName()Deprecated.Get the simple name of the class.List<String>getPackageList()Deprecated.Returns the packages in outer-to-inner order.Class<?>getType()Deprecated.Gets the Class instance identified by this qualified name.booleanisAnonymousClass()Deprecated.Returns true if this qualified name identifies an anonymous class.booleanisClass()Deprecated.booleanisLocalClass()Deprecated.Returns true if this qualified name identifies a local class.booleanisOperation()Deprecated.booleanisUnnamedPackage()Deprecated.Returns true if the class represented by this qualified name is in the unnamed package.protected booleanstructurallyEquals(JavaQualifiedName qname)Deprecated.Returns true if the given qname is identical to this qname.-
Methods inherited from class net.sourceforge.pmd.lang.java.ast.JavaQualifiedName
equals, getClasses, getOperation, getPackages, hashCode, ofClass, ofString, toString
-
-
-
-
Method Detail
-
getClassName
public JavaTypeQualifiedName getClassName()
Deprecated.- Specified by:
getClassNamein interfaceQualifiedName- Specified by:
getClassNamein classJavaQualifiedName
-
structurallyEquals
protected boolean structurallyEquals(JavaQualifiedName qname)
Deprecated.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()
Deprecated.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
-
isClass
public boolean isClass()
Deprecated.
-
isOperation
public boolean isOperation()
Deprecated.
-
isLocalClass
public boolean isLocalClass()
Deprecated.Returns true if this qualified name identifies a local class.- Overrides:
isLocalClassin classJavaQualifiedName
-
isAnonymousClass
public boolean isAnonymousClass()
Deprecated.Returns true if this qualified name identifies an anonymous class.
-
getClassSimpleName
public String getClassSimpleName()
Deprecated.Get the simple name of the class.- Overrides:
getClassSimpleNamein classJavaQualifiedName
-
isUnnamedPackage
public boolean isUnnamedPackage()
Deprecated.Returns true if the class represented by this qualified name is in the unnamed package.- Overrides:
isUnnamedPackagein classJavaQualifiedName
-
getPackageList
public List<String> getPackageList()
Deprecated.Returns the packages in outer-to-inner order. This is specific to Java's package structure. If the outer class is in the unnamed package, returns an empty list.@NotNull
- Returns:
- The packages.
-
getClassList
public List<String> getClassList()
Deprecated.Returns the class specific part of the name. It identifies a class in the namespace it's declared in. If the class is nested inside another, then the list returned contains all enclosing classes in order, from outermost to innermost.@NotNull
- Returns:
- The class names.
-
getType
public Class<?> getType()
Deprecated.Gets the Class instance identified by this qualified name.- Returns:
- A class instance, or null if the classloader threw a
ClassNotFoundExceptionorLinkageErrorwhile trying to load the class.
-
getBinaryName
public String getBinaryName()
Deprecated.Returns the binary name of the type identified by this qualified name. The binary name can be used to load aClassusing aClassLoader. Contrary to this method,JavaQualifiedName.toString()is not guaranteed to return a binary name. For most purposes, you should avoid using this method directly and usegetType()instead. Just don't build a dependency on the toString if you want a binary name.- Returns:
- The binary name of the type identified by this qualified name
-
buildToString
protected String buildToString()
Deprecated.Description copied from class:JavaQualifiedNameConstruct the toString once. Called only once per instance- Specified by:
buildToStringin classJavaQualifiedName
-
-