Class AnnotationClassRef


  • public class AnnotationClassRef
    extends java.lang.Object
    Stores the type descriptor of a Class<?>, as found in an annotation parameter value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected ScanResult scanResult
      The scan result.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      protected void findReferencedClassNames​(java.util.Set<java.lang.String> classNames)  
      ClassInfo getClassInfo()
      Get the class info.
      protected java.lang.String getClassName()
      The name of the class (used by getClassInfo() to fetch the ClassInfo object for the class).
      java.lang.String getName()
      Get the name of the referenced class.
      int hashCode()  
      java.lang.Class<?> loadClass()
      Loads the referenced class, returning a Class<?> reference for the referenced class.
      java.lang.Class<?> loadClass​(boolean ignoreExceptions)
      Loads the referenced class, returning a Class<?> reference for the referenced class.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • scanResult

        protected transient ScanResult scanResult
        The scan result.
    • Method Detail

      • getName

        public java.lang.String getName()
        Get the name of the referenced class.
        Returns:
        The name of the referenced class.
      • loadClass

        public java.lang.Class<?> loadClass​(boolean ignoreExceptions)
        Loads the referenced class, returning a Class<?> reference for the referenced class.
        Parameters:
        ignoreExceptions - if true, ignore exceptions and instead return null if the class could not be loaded.
        Returns:
        The Class<?> reference for the referenced class.
        Throws:
        java.lang.IllegalArgumentException - if the class could not be loaded and ignoreExceptions was false.
      • loadClass

        public java.lang.Class<?> loadClass()
        Loads the referenced class, returning a Class<?> reference for the referenced class.
        Returns:
        The Class<?> reference for the referenced class.
        Throws:
        java.lang.IllegalArgumentException - if the class could not be loaded.
      • getClassName

        protected java.lang.String getClassName()
        The name of the class (used by getClassInfo() to fetch the ClassInfo object for the class).
        Returns:
        The class name.
      • getClassInfo

        public ClassInfo getClassInfo()
        Get the class info.
        Returns:
        The ClassInfo object for the referenced class, or null if the referenced class was not encountered during scanning (i.e. if no ClassInfo object was created for the class during scanning). N.B. even if this method returns null, loadClass() may be able to load the referenced class by name.
      • findReferencedClassNames

        protected void findReferencedClassNames​(java.util.Set<java.lang.String> classNames)
      • hashCode

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

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

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