Class AnnotationClassRef
- java.lang.Object
-
- io.github.lukehutch.fastclasspathscanner.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 Summary
Fields Modifier and Type Field Description protected ScanResult
scanResult
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
ClassInfo
getClassInfo()
Get theClassInfo
object for the referenced class, or null if the referenced class was not encountered during scanning (i.e.String
getClassName()
Return the name of the referenced class.protected void
getClassNamesFromTypeDescriptors(Set<String> classNames)
int
hashCode()
Class<?>
loadClass()
Load the referenced class, if not already loaded, returning aClass<?>
reference for the referenced class.String
toString()
-
-
-
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 theClassInfo
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 aClass<?>
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)
-
-