Package io.github.fastclasspathscanner
Class AnnotationEnumValue
- java.lang.Object
-
- io.github.fastclasspathscanner.AnnotationEnumValue
-
- All Implemented Interfaces:
Comparable<AnnotationEnumValue>
public class AnnotationEnumValue extends Object implements Comparable<AnnotationEnumValue>
Class for wrapping an enum constant value (split into class name and constant name) referenced inside an annotation.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScanResultscanResult
-
Constructor Summary
Constructors Constructor Description AnnotationEnumValue(String className, String constValueName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(AnnotationEnumValue o)booleanequals(Object o)StringgetClassName()Return the name of the enum class.StringgetName()Get the fully-qualified name of the enum const value, i.e.StringgetValueName()Return the name of the enum const value.inthashCode()ObjectloadClassAndReturnEnumValue()Loads the enum class, if it has not yet been loaded, instantiates the enum constants, and returns the enum constant value represented by thisAnnotationEnumValue.StringtoString()
-
-
-
Field Detail
-
scanResult
protected transient ScanResult scanResult
-
-
Method Detail
-
getClassName
public String getClassName()
Return the name of the enum class.
-
getValueName
public String getValueName()
Return the name of the enum const value.
-
getName
public String getName()
Get the fully-qualified name of the enum const value, i.e. (getClassName() + getConstValueName()).- Returns:
- The fully-qualified name of the enum const value, i.e. (getClassName() + getConstValueName()).
-
loadClassAndReturnEnumValue
public Object loadClassAndReturnEnumValue() throws IllegalArgumentException
Loads the enum class, if it has not yet been loaded, instantiates the enum constants, and returns the enum constant value represented by thisAnnotationEnumValue.- Returns:
- The enum constant value.
- Throws:
IllegalArgumentException- if the class could not be loaded, or the enum constant is invalid.
-
compareTo
public int compareTo(AnnotationEnumValue o)
- Specified by:
compareToin interfaceComparable<AnnotationEnumValue>
-
-