Class ClassDescriptor

    • Constructor Detail

      • ClassDescriptor

        protected ClassDescriptor​(@SlashedClassName
                                  java.lang.String className)
        Constructor.
        Parameters:
        className - class name in VM format, e.g. "java/lang/String"
    • Method Detail

      • getClassName

        @SlashedClassName
        public final java.lang.String getClassName()
        Returns:
        Returns the class name in VM format, e.g. "java/lang/String"
      • matches

        public boolean matches​(java.lang.Class<?> c)
      • toResourceName

        public java.lang.String toResourceName()
        Get the resource name of this class as it would appear in the classpath. E.g., "java/lang/String.class"
        Returns:
        the resource name
      • toDottedClassName

        @Deprecated
        @DottedClassName
        public java.lang.String toDottedClassName()
        Deprecated.
        Get the name of the class in dotted format.
        Returns:
        the name of the class in dotted format
      • getDottedClassName

        @DottedClassName
        public java.lang.String getDottedClassName()
        Get the name of the class in dotted format.
        Returns:
        the name of the class in dotted format
      • getPackageName

        @DottedClassName
        public java.lang.String getPackageName()
        Get the name of the package in dotted format.
        Returns:
        the name of the package in dotted format
      • getSimpleName

        public java.lang.String getSimpleName()
        Get the simple name of the class
        Returns:
        the simple name of the class
      • getSignature

        public java.lang.String getSignature()
      • isArray

        public boolean isArray()
      • isClassResource

        @Deprecated
        public static boolean isClassResource​(java.lang.String resourceName)
        Determine whether or not the given resource name refers to a class.
        Parameters:
        resourceName - the resource name
        Returns:
        true if the resource is a class, false otherwise
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

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

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

        public static void throwClassNotFoundException​(ClassDescriptor classDescriptor)
                                                throws java.lang.ClassNotFoundException
        Throw a ClassNotFoundException to indicate that class named by given ClassDescriptor cannot be found. The exception message is formatted in a way that can be decoded by ClassNotFoundExceptionParser.
        Parameters:
        classDescriptor - ClassDescriptor naming a class that cannot be found
        Throws:
        java.lang.ClassNotFoundException
        See Also:
        ClassNotFoundExceptionParser
      • isAnonymousClass

        public boolean isAnonymousClass()