Class AnnotationParameterValueList

    • Field Summary

      • Fields inherited from class java.util.AbstractList

        modCount
    • 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
      • Methods inherited from class java.util.AbstractCollection

        containsAll, toString
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Collection

        parallelStream, stream, toArray
      • Methods inherited from interface java.util.List

        containsAll
    • Method Detail

      • 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.
      • 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