Class QualifiedNameFactory


  • @Deprecated
    public final class QualifiedNameFactory
    extends Object
    Deprecated.
    Was internal API, will be removed. See JavaQualifiedName.
    Static factory methods for JavaQualifiedName. These are intended only for tests, even though some deprecated APIs use it. May be moved to an internal package?
    Since:
    6.1.0
    Author:
    Clément Fournier
    • Method Detail

      • ofClass

        public static JavaTypeQualifiedName ofClass​(Class<?> clazz)
        Deprecated.
        Gets the qualified name of a class.
        Parameters:
        clazz - Class object
        Returns:
        The qualified name of the class, or null if the class is null
      • ofString

        public static JavaQualifiedName ofString​(String name)
        Deprecated.
        Parses a qualified name given in the format defined for this implementation. The format is specified by a regex pattern (see FORMAT). Examples:

        com.company.MyClass$Nested#myMethod(String, int)

        • Packages are separated by full stops;
        • Nested classes are separated by a dollar symbol;
        • The optional method suffix is separated from the class with a hashtag;
        • Method arguments are separated by a comma and a single space.

        MyClass$Nested

        • The qualified name of a class in the unnamed package starts with the class name.

        com.foo.Class$1LocalClass

        • A local class' qualified name is assigned an index which identifies it within the scope of its enclosing class. The index is displayed after the separating dollar symbol.
        Parameters:
        name - The name to parse.
        Returns:
        A qualified name instance corresponding to the parsed string.