- All Superinterfaces:
ClassFileElement,WritableElement<AnnotationValue>
- All Known Subinterfaces:
AnnotationImpl.OfConstantImpl,AnnotationValue.OfAnnotation,AnnotationValue.OfArray,AnnotationValue.OfBoolean,AnnotationValue.OfByte,AnnotationValue.OfCharacter,AnnotationValue.OfClass,AnnotationValue.OfConstant,AnnotationValue.OfDouble,AnnotationValue.OfEnum,AnnotationValue.OfFloat,AnnotationValue.OfInteger,AnnotationValue.OfLong,AnnotationValue.OfShort,AnnotationValue.OfString
- All Known Implementing Classes:
AnnotationImpl.OfAnnotationImpl,AnnotationImpl.OfArrayImpl,AnnotationImpl.OfBooleanImpl,AnnotationImpl.OfByteImpl,AnnotationImpl.OfCharacterImpl,AnnotationImpl.OfClassImpl,AnnotationImpl.OfDoubleImpl,AnnotationImpl.OfEnumImpl,AnnotationImpl.OfFloatImpl,AnnotationImpl.OfIntegerImpl,AnnotationImpl.OfLongImpl,AnnotationImpl.OfShortImpl,AnnotationImpl.OfStringImpl
public sealed interface AnnotationValue
extends WritableElement<AnnotationValue>
permits AnnotationValue.OfAnnotation, AnnotationValue.OfArray, AnnotationValue.OfConstant, AnnotationValue.OfClass, AnnotationValue.OfEnum
Models the value of a key-value pair of an annotation.
- Since:
- 22
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceModels an annotation-valued elementstatic interfaceModels an array-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a class-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels an enum-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued elementstatic interfaceModels a constant-valued element -
Method Summary
Modifier and TypeMethodDescriptionstatic AnnotationValueReturns an annotation element.static AnnotationValue.OfAnnotationofAnnotation(Annotation value) Returns an annotation element for an annotation-valued element.static AnnotationValue.OfArrayofArray(List<AnnotationValue> values) Returns an annotation element for an array-valued element.static AnnotationValue.OfArrayofArray(AnnotationValue... values) Returns an annotation element for an array-valued element.static AnnotationValue.OfConstantofBoolean(boolean value) Returns an annotation element for a boolean-valued element.static AnnotationValue.OfConstantofBoolean(IntegerEntry value) Returns an annotation element for a boolean-valued element.static AnnotationValue.OfConstantofByte(byte value) Returns an annotation element for a byte-valued element.static AnnotationValue.OfConstantofByte(IntegerEntry value) Returns an annotation element for a byte-valued element.static AnnotationValue.OfConstantofChar(char value) Returns an annotation element for a char-valued element.static AnnotationValue.OfConstantofChar(IntegerEntry value) Returns an annotation element for a char-valued element.static AnnotationValue.OfClassReturns an annotation element for a class-valued element.static AnnotationValue.OfClassReturns an annotation element for a class-valued element.static AnnotationValue.OfConstantofDouble(double value) Returns an annotation element for a double-valued element.static AnnotationValue.OfConstantofDouble(DoubleEntry value) Returns an annotation element for a double-valued element.static AnnotationValue.OfEnumReturns an annotation element for a enum-valued element.static AnnotationValue.OfEnumReturns an annotation element for a enum-valued element.static AnnotationValue.OfConstantofFloat(float value) Returns an annotation element for a float-valued element.static AnnotationValue.OfConstantofFloat(FloatEntry value) Returns an annotation element for a float-valued element.static AnnotationValue.OfConstantofInt(int value) Returns an annotation element for an int-valued element.static AnnotationValue.OfConstantofInt(IntegerEntry value) Returns an annotation element for an int-valued element.static AnnotationValue.OfConstantofLong(long value) Returns an annotation element for a long-valued element.static AnnotationValue.OfConstantReturns an annotation element for a long-valued element.static AnnotationValue.OfConstantofShort(short value) Returns an annotation element for a short-valued element.static AnnotationValue.OfConstantofShort(IntegerEntry value) Returns an annotation element for a short-valued element.static AnnotationValue.OfConstantReturns an annotation element for a string-valued element.static AnnotationValue.OfConstantReturns an annotation element for a string-valued element.chartag()Returns the tag character for this type as per .Methods inherited from interface org.glavo.classfile.WritableElement
writeTo
-
Method Details
-
tag
char tag()Returns the tag character for this type as per .- Returns:
- the tag character for this type as per
-
ofEnum
Returns an annotation element for a enum-valued element.- Parameters:
className- the name of the enum classconstantName- the name of the enum constant- Returns:
- an annotation element for a enum-valued element
-
ofEnum
Returns an annotation element for a enum-valued element.- Parameters:
className- the name of the enum classconstantName- the name of the enum constant- Returns:
- an annotation element for a enum-valued element
-
ofClass
Returns an annotation element for a class-valued element.- Parameters:
className- the name of the enum class- Returns:
- an annotation element for a class-valued element
-
ofClass
Returns an annotation element for a class-valued element.- Parameters:
className- the name of the enum class- Returns:
- an annotation element for a class-valued element
-
ofString
Returns an annotation element for a string-valued element.- Parameters:
value- the string- Returns:
- an annotation element for a string-valued element
-
ofString
Returns an annotation element for a string-valued element.- Parameters:
value- the string- Returns:
- an annotation element for a string-valued element
-
ofDouble
Returns an annotation element for a double-valued element.- Parameters:
value- the double value- Returns:
- an annotation element for a double-valued element
-
ofDouble
Returns an annotation element for a double-valued element.- Parameters:
value- the double value- Returns:
- an annotation element for a double-valued element
-
ofFloat
Returns an annotation element for a float-valued element.- Parameters:
value- the float value- Returns:
- an annotation element for a float-valued element
-
ofFloat
Returns an annotation element for a float-valued element.- Parameters:
value- the float value- Returns:
- an annotation element for a float-valued element
-
ofLong
Returns an annotation element for a long-valued element.- Parameters:
value- the long value- Returns:
- an annotation element for a long-valued element
-
ofLong
Returns an annotation element for a long-valued element.- Parameters:
value- the long value- Returns:
- an annotation element for a long-valued element
-
ofInt
Returns an annotation element for an int-valued element.- Parameters:
value- the int value- Returns:
- an annotation element for an int-valued element
-
ofInt
Returns an annotation element for an int-valued element.- Parameters:
value- the int value- Returns:
- an annotation element for an int-valued element
-
ofShort
Returns an annotation element for a short-valued element.- Parameters:
value- the short value- Returns:
- an annotation element for a short-valued element
-
ofShort
Returns an annotation element for a short-valued element.- Parameters:
value- the short value- Returns:
- an annotation element for a short-valued element
-
ofChar
Returns an annotation element for a char-valued element.- Parameters:
value- the char value- Returns:
- an annotation element for a char-valued element
-
ofChar
Returns an annotation element for a char-valued element.- Parameters:
value- the char value- Returns:
- an annotation element for a char-valued element
-
ofByte
Returns an annotation element for a byte-valued element.- Parameters:
value- the byte value- Returns:
- an annotation element for a byte-valued element
-
ofByte
Returns an annotation element for a byte-valued element.- Parameters:
value- the byte value- Returns:
- an annotation element for a byte-valued element
-
ofBoolean
Returns an annotation element for a boolean-valued element.- Parameters:
value- the boolean value- Returns:
- an annotation element for a boolean-valued element
-
ofBoolean
Returns an annotation element for a boolean-valued element.- Parameters:
value- the boolean value- Returns:
- an annotation element for a boolean-valued element
-
ofAnnotation
Returns an annotation element for an annotation-valued element.- Parameters:
value- the annotation- Returns:
- an annotation element for an annotation-valued element
-
ofArray
Returns an annotation element for an array-valued element.- Parameters:
values- the values- Returns:
- an annotation element for an array-valued element
-
ofArray
Returns an annotation element for an array-valued element.- Parameters:
values- the values- Returns:
- an annotation element for an array-valued element
-
of
Returns an annotation element. Thevalueparameter must be a primitive, a wrapper of primitive, a String, a ClassDesc, an enum constant, or an array of one of these.- Parameters:
value- the annotation value- Returns:
- an annotation element
- Throws:
IllegalArgumentException- when thevalueparameter is not a primitive, a wrapper of primitive, a String, a ClassDesc, an enum constant, or an array of one of these.
-