Package io.github.classgraph
Class AnnotationClassRef
- java.lang.Object
-
- io.github.classgraph.AnnotationClassRef
-
public class AnnotationClassRef extends Object
Stores the type descriptor of aClass<?>, as found in an annotation parameter value.
-
-
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()protected StringgetClassName()The name of the class (used bygetClassInfo()to fetch theClassInfoobject for the class).protected voidgetClassNamesFromTypeDescriptors(Set<String> classNames)StringgetName()inthashCode()Class<?>loadClass()Loads the referenced class, returning aClass<?>reference for the referenced class.Class<?>loadClass(boolean ignoreExceptions)Loads the referenced class, returning aClass<?>reference for the referenced class.StringtoString()
-
-
-
Field Detail
-
scanResult
protected transient ScanResult scanResult
-
-
Method Detail
-
getName
public String getName()
- Returns:
- The name of the referenced class.
-
loadClass
public Class<?> loadClass(boolean ignoreExceptions)
Loads the referenced class, returning aClass<?>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:
IllegalArgumentException- if the class could not be loaded and ignoreExceptions was false.
-
loadClass
public Class<?> loadClass()
Loads the referenced class, returning aClass<?>reference for the referenced class.- Returns:
- The
Class<?>reference for the referenced class. - Throws:
IllegalArgumentException- if the class could not be loaded.
-
getClassName
protected String getClassName()
The name of the class (used bygetClassInfo()to fetch theClassInfoobject for the class).
-
getClassInfo
public ClassInfo getClassInfo()
- Returns:
- The
ClassInfoobject 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.
-
getClassNamesFromTypeDescriptors
protected void getClassNamesFromTypeDescriptors(Set<String> classNames)
-
-