Class AnnotationInfo.AnnotationEnumValue
- java.lang.Object
-
- io.github.lukehutch.fastclasspathscanner.scanner.AnnotationInfo.AnnotationEnumValue
-
- All Implemented Interfaces:
Comparable<AnnotationInfo.AnnotationEnumValue>
- Enclosing class:
- AnnotationInfo
public static class AnnotationInfo.AnnotationEnumValue extends Object implements Comparable<AnnotationInfo.AnnotationEnumValue>
Class for wrapping an enum constant value (split into class name and constant name) referenced inside an annotation.
-
-
Constructor Summary
Constructors Constructor Description AnnotationEnumValue(String className, String constName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(AnnotationInfo.AnnotationEnumValue o)
boolean
equals(Object o)
String
getClassName()
Get the class name of the enum.String
getConstName()
Get the name of the enum constant.Object
getEnumValueRef()
Get the enum constant.int
hashCode()
String
toString()
-
-
-
Method Detail
-
getClassName
public String getClassName()
Get the class name of the enum.- Returns:
- The name of the enum class.
-
getConstName
public String getConstName()
Get the name of the enum constant.- Returns:
- The name of the enum constant.
-
getEnumValueRef
public Object getEnumValueRef() throws IllegalArgumentException
Get the enum constant. Causes the ClassLoader to load the enum class.- Returns:
- A ref to the enum constant value.
- Throws:
IllegalArgumentException
- if the class could not be loaded, or the enum constant is invalid.
-
compareTo
public int compareTo(AnnotationInfo.AnnotationEnumValue o)
- Specified by:
compareTo
in interfaceComparable<AnnotationInfo.AnnotationEnumValue>
-
-