Class JavaTypeQualifiedName

  • All Implemented Interfaces:

    public final class JavaTypeQualifiedName
    extends JavaQualifiedName
    Specialises JavaQualifiedName for type names.
    Clément Fournier
    • Method Detail

      • buildHashCode

        protected int buildHashCode()
        Description copied from class: JavaQualifiedName
        Computes the hashcode. Called once, then cached. Since QualifiedNames are mostly used as the keys of a map, caching the hashcode makes sense.
        Specified by:
        buildHashCode in class JavaQualifiedName
      • isClass

        public boolean isClass()
      • isOperation

        public boolean isOperation()
      • isLocalClass

        public boolean isLocalClass()
        Returns true if this qualified name identifies a local class.
        isLocalClass in class JavaQualifiedName
      • isAnonymousClass

        public boolean isAnonymousClass()
        Returns true if this qualified name identifies an anonymous class.
      • isUnnamedPackage

        public boolean isUnnamedPackage()
        Returns true if the class represented by this qualified name is in the unnamed package.
        isUnnamedPackage in class JavaQualifiedName
      • getPackageList

        public java.util.List<java.lang.String> getPackageList()
        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.


        The packages.
      • getClassList

        public java.util.List<java.lang.String> getClassList()
        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.


        The class names.
      • getType

        public java.lang.Class<?> getType()
        Gets the Class instance identified by this qualified name.
        A class instance, or null if the classloader threw a ClassNotFoundException or LinkageError while trying to load the class.
      • getBinaryName

        public java.lang.String getBinaryName()
        Returns the binary name of the type identified by this qualified name. The binary name can be used to load a Class using a ClassLoader. 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 use getType() instead. Just don't build a dependency on the toString if you want a binary name.
        The binary name of the type identified by this qualified name