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 ScanResultscanResult
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)ClassInfogetClassInfo()Get theClassInfoobject for the referenced class, or null if the referenced class was not encountered during scanning (i.e.StringgetClassName()Return the name of the referenced class.protected voidgetClassNamesFromTypeDescriptors(Set<String> classNames)inthashCode()Class<?>loadClass()Load the referenced class, if not already loaded, returning aClass<?>reference for the referenced class.StringtoString()
-
-
-
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 theClassInfoobject 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
ClassInfoobject 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)
-
-