Package io.github.classgraph
Class AnnotationParameterValueList
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<AnnotationParameterValue>
-
- io.github.classgraph.AnnotationParameterValueList
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Cloneable
,java.lang.Iterable<AnnotationParameterValue>
,java.util.Collection<AnnotationParameterValue>
,java.util.List<AnnotationParameterValue>
,java.util.RandomAccess
public class AnnotationParameterValueList extends java.util.ArrayList<AnnotationParameterValue>
A list ofAnnotationParameterValue
objects.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,AnnotationParameterValue>
asMap()
boolean
containsName(java.lang.String parameterName)
java.lang.Object
get(java.lang.String parameterName)
java.util.List<java.lang.String>
getAsStrings()
java.util.List<java.lang.String>
getNames()
-
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Method Detail
-
getNames
public java.util.List<java.lang.String> getNames()
- Returns:
- The names of all
AnnotationParameterValue
objects in this list, by callingAnnotationParameterValue.getName()
for each item in the list.
-
getAsStrings
public java.util.List<java.lang.String> getAsStrings()
- Returns:
- The string representations of all annotation parameter values in this list, by calling
AnnotationParameterValue.toString()
for each item in the list.
-
asMap
public java.util.Map<java.lang.String,AnnotationParameterValue> asMap()
- Returns:
- This
AnnotationParameterValueList
as a map from annotation parameter name toAnnotationParameterValue
object.
-
containsName
public boolean containsName(java.lang.String parameterName)
- Parameters:
parameterName
- The name of an annotation parameter.- Returns:
- true if this list contains an annotation parameter with the given name.
-
get
public java.lang.Object get(java.lang.String parameterName)
- Parameters:
parameterName
- The name of an annotation parameter.- Returns:
- The value of the
AnnotationParameterValue
object in the list with the given name, or null if not found.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
-
-