Class AnnotationClassRef


  • public class AnnotationClassRef
    extends Object
    Stores a class descriptor in an annotation as a class type string, e.g. "[[[java/lang/String;" is stored as "String[][][]".

    Use ReflectionUtils.typeStrToClass() to get a Class<?> reference from this class type string.

    • Field Detail

      • scanResult

        protected transient ScanResult scanResult
    • Method Detail

      • getClassName

        public String getClassName()
        Return the name of the referenced class.
      • getClassInfo

        public ClassInfo getClassInfo()
        Get the ClassInfo object for the referenced class, or null if the referenced class was not encountered during scanning (i.e. 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.
        Returns:
        The ClassInfo object for the referenced class.
      • loadClass

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

        protected void getClassNamesFromTypeDescriptors​(Set<String> classNames)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object