Package io.github.classgraph
Class AnnotationParameterValue
- java.lang.Object
-
- io.github.classgraph.AnnotationParameterValue
-
- All Implemented Interfaces:
Comparable<AnnotationParameterValue>
public class AnnotationParameterValue extends Object implements Comparable<AnnotationParameterValue>
A wrapper used to pair annotation parameter names with annotation parameter values.
-
-
Field Summary
Fields Modifier and Type Field Description protected ScanResultscanResult
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(AnnotationParameterValue o)booleanequals(Object obj)protected ClassInfogetClassInfo()protected StringgetClassName()The name of the class (used bygetClassInfo()to fetch theClassInfoobject for the class).StringgetName()ObjectgetValue()inthashCode()StringtoString()
-
-
-
Field Detail
-
scanResult
protected transient ScanResult scanResult
-
-
Method Detail
-
getName
public String getName()
- Returns:
- The annotation parameter name.
-
getValue
public Object getValue()
- Returns:
- The annotation parameter value. May be one of the following types:
- String for string constants
- String[] for arrays of strings
- A boxed type, e.g. Integer or Character, for primitive-typed constants
- A 1-dimensional primitive-typed array (i.e. int[], long[], short[], char[], byte[], boolean[], float[], or double[]), for arrays of primitives
- A 1-dimensional
Object[] array for array types (and then the array element type may be one of the types in this list) AnnotationEnumValue, for enum constants (this wraps the enum class and the string name of the constant)AnnotationClassRef, for Class references within annotations (this wraps the name of the referenced class)AnnotationInfo, for nested annotations
-
getClassName
protected String getClassName()
The name of the class (used bygetClassInfo()to fetch theClassInfoobject for the class).- Returns:
- The class name.
-
getClassInfo
protected ClassInfo getClassInfo()
-
compareTo
public int compareTo(AnnotationParameterValue o)
- Specified by:
compareToin interfaceComparable<AnnotationParameterValue>
-
-