Class JavaQualifiedName

    • Constructor Detail

      • JavaQualifiedName

        public JavaQualifiedName()
    • Method Detail

      • getClassName

        public abstract JavaTypeQualifiedName getClassName()
        Specified by:
        getClassName in interface net.sourceforge.pmd.lang.ast.QualifiedName
      • isLocalClass

        @Deprecated
        public boolean isLocalClass()
        Deprecated.
        Use JavaTypeQualifiedName.isLocalClass(). Will be removed in 7.0.0
        Returns true if this qualified name identifies a local class.
      • isUnnamedPackage

        @Deprecated
        public boolean isUnnamedPackage()
        Deprecated.
        Use JavaTypeQualifiedName.isUnnamedPackage(). Will be removed in 7.0.0
        Returns true if the class represented by this qualified name is in the unnamed package.
      • getOperation

        @Deprecated
        public java.lang.String getOperation()
        Deprecated.
        Use JavaOperationQualifiedName.getOperation(). Will be removed in 7.0.0
        Returns the operation specific part of the name. It identifies an operation in its namespace. Returns null if QualifiedName.isOperation() returns false.
        Returns:
        The operation string, or null.
      • equals

        public final boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • structurallyEquals

        protected abstract boolean structurallyEquals​(JavaQualifiedName qname)
        Returns true if the given qname is identical to this qname. Performs a structural comparison. Used in the implementation of equals(Object) after taking shortcuts.
        Parameters:
        qname - The other comparand. Can always be casted down to the subclass type in which this method is overridden
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • buildHashCode

        protected abstract int buildHashCode()
        Computes the hashcode. Called once, then cached. Since QualifiedNames are mostly used as the keys of a map, caching the hashcode makes sense.
      • toString

        public final java.lang.String toString()
        Returns the string representation of this qualified name. The representation follows the format defined for QualifiedNameFactory.ofString(String).
        Specified by:
        toString in interface net.sourceforge.pmd.lang.ast.QualifiedName
        Overrides:
        toString in class java.lang.Object
      • buildToString

        protected abstract java.lang.String buildToString()
        Construct the toString once. Called only once per instance