Class JavaQualifiedName

  • All Implemented Interfaces:
    Direct Known Subclasses:
    JavaOperationQualifiedName, JavaTypeQualifiedName

    public abstract class JavaQualifiedName
    extends Object
    implements QualifiedName
    This class and subclasses will be removed in PMD 7.0 for lack of usefulness. JavaQualifiedName cannot be used to represent unknown entities, because in Java source, the only thing we can observe are *canonical* names, which eg don't exist for local classes, and can be ambiguous between a member class and a package name.

    So you can't build a conformant JavaQualifiedName without having parsed the source file where the entity is. But since you have parsed the file, you have much better data structures than JavaQualifiedName to reflect the content of the program: you have nodes. So we can do away with this class.

    Unambiguous identifier for a java method or class. This implementation approaches the qualified name format found in stack traces for example, using a custom format specification (see QualifiedNameFactory.ofString(String)).

    Instances of this class are immutable. They can be obtained from the factory methods of QualifiedNameFactory, or from JavaQualifiableNode.getQualifiedName() on AST nodes that support it.

    Class qualified names follow the binary name spec.

    Method qualified names don't follow a specification but allow to distinguish overloads of the same method, using parameter types and order.

    Clément Fournier
    See Also:
    JavaTypeQualifiedName, JavaOperationQualifiedName