Class ObjectType


  • public class ObjectType
    extends ReferenceType
    Denotes reference such as java.lang.String.
    • Constructor Detail

      • ObjectType

        public ObjectType​(String className)
        Parameters:
        className - fully qualified class name, e.g. java.lang.String
    • Method Detail

      • getInstance

        public static ObjectType getInstance​(String className)
        Since:
        6.0
      • getClassName

        public String getClassName()
        Returns:
        name of referenced class
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Type
        Returns:
        a hash code value for the object.
      • equals

        public boolean equals​(Object type)
        Overrides:
        equals in class Type
        Returns:
        true if both type objects refer to the same class.
      • referencesClass

        @Deprecated
        public boolean referencesClass()
        Deprecated.
        (since 6.0) this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesClassExact() instead
        If "this" doesn't reference a class, it references an interface or a non-existant entity.
      • referencesInterface

        @Deprecated
        public boolean referencesInterface()
        Deprecated.
        (since 6.0) this method returns an inaccurate result if the class or interface referenced cannot be found: use referencesInterfaceExact() instead
        If "this" doesn't reference an interface, it references a class or a non-existant entity.
      • referencesClassExact

        public boolean referencesClassExact()
                                     throws ClassNotFoundException
        Return true if this type references a class, false if it references an interface.
        Returns:
        true if the type references a class, false if it references an interface
        Throws:
        ClassNotFoundException - if the class or interface referenced by this type can't be found
      • referencesInterfaceExact

        public boolean referencesInterfaceExact()
                                         throws ClassNotFoundException
        Return true if this type references an interface, false if it references a class.
        Returns:
        true if the type references an interface, false if it references a class
        Throws:
        ClassNotFoundException - if the class or interface referenced by this type can't be found