Class AnnotationParameterValueList

    • Method Detail

      • containsName

        public boolean containsName​(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 Object get​(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