Interface AnnotationValue
- All Known Subinterfaces:
- AnnotationValue.OfAnnotation,- AnnotationValue.OfArray,- AnnotationValue.OfBoolean,- AnnotationValue.OfByte,- AnnotationValue.OfChar,- AnnotationValue.OfClass,- AnnotationValue.OfConstant,- AnnotationValue.OfDouble,- AnnotationValue.OfEnum,- AnnotationValue.OfFloat,- AnnotationValue.OfInt,- AnnotationValue.OfLong,- AnnotationValue.OfShort,- AnnotationValue.OfString
public sealed interface AnnotationValue
permits AnnotationValue.OfAnnotation, AnnotationValue.OfArray, AnnotationValue.OfConstant, AnnotationValue.OfClass, AnnotationValue.OfEnum
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceModels an annotation value of an element-value pair.static interfaceModels an array value of an element-value pair.static interfaceModels a boolean value of an element-value pair.static interfaceModels a byte value of an element-value pair.static interfaceModels a char value of an element-value pair.static interfaceModels a class value of an element-value pair.static interfaceModels a constant value of an element-value pair.static interfaceModels a double value of an element-value pair.static interfaceModels an enum value of an element-value pair.static interfaceModels a float value of an element-value pair.static interfaceModels an int value of an element-value pair.static interfaceModels a long value of an element-value pair.static interfaceModels a short value of an element-value pair.static interfaceModels a string value of an element-value pair.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final intThetagindicating the value of an element-value pair isAnnotationValue.OfAnnotation.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfArray.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfBoolean.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfByte.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfChar.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfClass.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfDouble.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfEnum.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfFloat.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfInt.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfLong.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfShort.static final intThetagindicating the value of an element-value pair isAnnotationValue.OfString.
- 
Method SummaryModifier and TypeMethodDescriptionstatic AnnotationValueReturns an annotation element.static AnnotationValue.OfAnnotationofAnnotation(Annotation value) Returns an annotation value for an element-value pair.static AnnotationValue.OfArrayofArray(AnnotationValue... values) Returns an array value for an element-value pair.static AnnotationValue.OfArrayofArray(List<AnnotationValue> values) Returns an array value for an element-value pair.static AnnotationValue.OfBooleanofBoolean(boolean value) Returns a boolean value for an element-value pair.static AnnotationValue.OfBooleanofBoolean(IntegerEntry value) Returns a boolean value for an element-value pair.static AnnotationValue.OfByteofByte(byte value) Returns a byte value for an element-value pair.static AnnotationValue.OfByteofByte(IntegerEntry value) Returns a byte value for an element-value pair.static AnnotationValue.OfCharofChar(char value) Returns a char value for an element-value pair.static AnnotationValue.OfCharofChar(IntegerEntry value) Returns a char value for an element-value pair.static AnnotationValue.OfClassReturns a class value for an element-value pair.static AnnotationValue.OfClassReturns a class value for an element-value pair.static AnnotationValue.OfDoubleofDouble(double value) Returns a double value for an element-value pair.static AnnotationValue.OfDoubleofDouble(DoubleEntry value) Returns a double value for an element-value pair.static AnnotationValue.OfEnumReturns an enum value for an element-value pair.static AnnotationValue.OfEnumReturns an enum value for an element-value pair.static AnnotationValue.OfFloatofFloat(float value) Returns a float value for an element-value pair.static AnnotationValue.OfFloatofFloat(FloatEntry value) Returns a float value for an element-value pair.static AnnotationValue.OfIntofInt(int value) Returns an int value for an element-value pair.static AnnotationValue.OfIntofInt(IntegerEntry value) Returns an int value for an element-value pair.static AnnotationValue.OfLongofLong(long value) Returns a long value for an element-value pair.static AnnotationValue.OfLongReturns a long value for an element-value pair.static AnnotationValue.OfShortofShort(short value) Returns a short value for an element-value pair.static AnnotationValue.OfShortofShort(IntegerEntry value) Returns a short value for an element-value pair.static AnnotationValue.OfStringReturns a string value for an element-value pair.static AnnotationValue.OfStringReturns a string value for an element-value pair.inttag()Returns the tag character for this value as per JVMS 4.7.16.1.
- 
Field Details- 
TAG_BYTEstatic final int TAG_BYTEThetagindicating the value of an element-value pair isAnnotationValue.OfByte.- See Also:
 
- 
TAG_CHARstatic final int TAG_CHARThetagindicating the value of an element-value pair isAnnotationValue.OfChar.- See Also:
 
- 
TAG_DOUBLEstatic final int TAG_DOUBLEThetagindicating the value of an element-value pair isAnnotationValue.OfDouble.- See Also:
 
- 
TAG_FLOATstatic final int TAG_FLOATThetagindicating the value of an element-value pair isAnnotationValue.OfFloat.- See Also:
 
- 
TAG_INTstatic final int TAG_INTThetagindicating the value of an element-value pair isAnnotationValue.OfInt.- See Also:
 
- 
TAG_LONGstatic final int TAG_LONGThetagindicating the value of an element-value pair isAnnotationValue.OfLong.- See Also:
 
- 
TAG_SHORTstatic final int TAG_SHORTThetagindicating the value of an element-value pair isAnnotationValue.OfShort.- See Also:
 
- 
TAG_BOOLEANstatic final int TAG_BOOLEANThetagindicating the value of an element-value pair isAnnotationValue.OfBoolean.- See Also:
 
- 
TAG_STRINGstatic final int TAG_STRINGThetagindicating the value of an element-value pair isAnnotationValue.OfString.- See Also:
 
- 
TAG_ENUMstatic final int TAG_ENUMThetagindicating the value of an element-value pair isAnnotationValue.OfEnum.- See Also:
 
- 
TAG_CLASSstatic final int TAG_CLASSThetagindicating the value of an element-value pair isAnnotationValue.OfClass.- See Also:
 
- 
TAG_ANNOTATIONstatic final int TAG_ANNOTATIONThetagindicating the value of an element-value pair isAnnotationValue.OfAnnotation.- See Also:
 
- 
TAG_ARRAYstatic final int TAG_ARRAYThetagindicating the value of an element-value pair isAnnotationValue.OfArray.- See Also:
 
 
- 
- 
Method Details- 
tagint tag()Returns the tag character for this value as per JVMS 4.7.16.1. The tag characters have a one-to-one mapping to the types of annotation element values.
- 
ofEnumReturns an enum value for an element-value pair.- Parameters:
- className- the descriptor string of the enum class
- constantName- the name of the enum constant
- Returns:
- an enum value for an element-value pair
 
- 
ofEnumReturns an enum value for an element-value pair.- Parameters:
- className- the descriptor of the enum class
- constantName- the name of the enum constant
- Returns:
- an enum value for an element-value pair
 
- 
ofClassReturns a class value for an element-value pair.- Parameters:
- className- the descriptor string of the class
- Returns:
- a class value for an element-value pair
 
- 
ofClassReturns a class value for an element-value pair.- Parameters:
- className- the descriptor of the class
- Returns:
- a class value for an element-value pair
 
- 
ofStringReturns a string value for an element-value pair.- Parameters:
- value- the string
- Returns:
- a string value for an element-value pair
 
- 
ofStringReturns a string value for an element-value pair.- Parameters:
- value- the string
- Returns:
- a string value for an element-value pair
 
- 
ofDoubleReturns a double value for an element-value pair.- Parameters:
- value- the double value
- Returns:
- a double value for an element-value pair
 
- 
ofDoubleReturns a double value for an element-value pair.- Parameters:
- value- the double value
- Returns:
- a double value for an element-value pair
 
- 
ofFloatReturns a float value for an element-value pair.- Parameters:
- value- the float value
- Returns:
- a float value for an element-value pair
 
- 
ofFloatReturns a float value for an element-value pair.- Parameters:
- value- the float value
- Returns:
- a float value for an element-value pair
 
- 
ofLongReturns a long value for an element-value pair.- Parameters:
- value- the long value
- Returns:
- a long value for an element-value pair
 
- 
ofLongReturns a long value for an element-value pair.- Parameters:
- value- the long value
- Returns:
- a long value for an element-value pair
 
- 
ofIntReturns an int value for an element-value pair.- Parameters:
- value- the int value
- Returns:
- an int value for an element-value pair
 
- 
ofIntReturns an int value for an element-value pair.- Parameters:
- value- the int value
- Returns:
- an int value for an element-value pair
 
- 
ofShortReturns a short value for an element-value pair.- Parameters:
- value- the short value
- Returns:
- a short value for an element-value pair
 
- 
ofShortReturns a short value for an element-value pair.- Parameters:
- value- the short value
- Returns:
- a short value for an element-value pair
 
- 
ofCharReturns a char value for an element-value pair.- Parameters:
- value- the char value
- Returns:
- a char value for an element-value pair
 
- 
ofCharReturns a char value for an element-value pair.- Parameters:
- value- the char value
- Returns:
- a char value for an element-value pair
 
- 
ofByteReturns a byte value for an element-value pair.- Parameters:
- value- the byte value
- Returns:
- a byte value for an element-value pair
 
- 
ofByteReturns a byte value for an element-value pair.- Parameters:
- value- the byte value
- Returns:
- a byte value for an element-value pair
 
- 
ofBooleanReturns a boolean value for an element-value pair.- Parameters:
- value- the boolean value
- Returns:
- a boolean value for an element-value pair
 
- 
ofBooleanReturns a boolean value for an element-value pair.- Parameters:
- value- the boolean value
- Returns:
- a boolean value for an element-value pair
 
- 
ofAnnotationReturns an annotation value for an element-value pair.- Parameters:
- value- the annotation
- Returns:
- an annotation value for an element-value pair
 
- 
ofArrayReturns an array value for an element-value pair.- API Note:
- See values()for conventions on array values derived from Java source code.
- Parameters:
- values- the array elements
- Returns:
- an array value for an element-value pair
 
- 
ofArrayReturns an array value for an element-value pair.- API Note:
- See values()for conventions on array values derived from Java source code.
- Parameters:
- values- the array elements
- Returns:
- an array value for an element-value pair
 
- 
ofReturns 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 the- valueparameter is not a primitive, a wrapper of primitive, a String, a ClassDesc, an enum constant, or an array of one of these.
 
 
-