Interface AnnotationElement
public sealed interface AnnotationElement
Models an element-value pair in the 
element_value_pairs
 table in the annotation structure defined in JVMS
 4.7.16 or the type_annotation structure defined
 in JVMS 4.7.20.
 
 Two AnnotationElement objects should be compared using the
 equals method.
- See Java Virtual Machine Specification:
- 
4.7.16.1 The element_valuestructure
- Since:
- 24
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionname()Returns the element name.static AnnotationElementof(Utf8Entry name, AnnotationValue value) Returns an element-value pair.static AnnotationElementof(String name, AnnotationValue value) Returns an element-value pair.static AnnotationElementofAnnotation(String name, Annotation value) Returns an element-value pair for an annotation-valued element.static AnnotationElementofArray(String name, AnnotationValue... values) Returns an element-value pair for an array-valued element.static AnnotationElementReturns an element-value pair for a boolean-valued element.static AnnotationElementReturns an element-value pair for a byte-valued element.static AnnotationElementReturns an element-value pair for a char-valued element.static AnnotationElementReturns an element-value pair for a class-valued element.static AnnotationElementReturns an element-value pair for a double-valued element.static AnnotationElementReturns an element-value pair for a float-valued element.static AnnotationElementReturns an element-value pair for an int-valued element.static AnnotationElementReturns an element-value pair for a long-valued element.static AnnotationElementReturns an element-value pair for a short-valued element.static AnnotationElementReturns an element-value pair for a string-valued element.value()Returns the element value.
- 
Method Details- 
nameUtf8Entry name()Returns the element name.
- 
value
- 
ofReturns an element-value pair.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair
 
- 
ofReturns an element-value pair.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair
 
- 
ofClassReturns an element-value pair for a class-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a class-valued element
- See Also:
 
- 
ofStringReturns an element-value pair for a string-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a string-valued element
- See Also:
 
- 
ofLongReturns an element-value pair for a long-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a long-valued element
- See Also:
 
- 
ofIntReturns an element-value pair for an int-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for an int-valued element
- See Also:
 
- 
ofCharReturns an element-value pair for a char-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a char-valued element
- See Also:
 
- 
ofShortReturns an element-value pair for a short-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a short-valued element
- See Also:
 
- 
ofByteReturns an element-value pair for a byte-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a byte-valued element
- See Also:
 
- 
ofBooleanReturns an element-value pair for a boolean-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a boolean-valued element
- See Also:
 
- 
ofDoubleReturns an element-value pair for a double-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a double-valued element
- See Also:
 
- 
ofFloatReturns an element-value pair for a float-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for a float-valued element
- See Also:
 
- 
ofAnnotationReturns an element-value pair for an annotation-valued element.- Parameters:
- name- the name of the key
- value- the associated value
- Returns:
- an element-value pair for an annotation-valued element
- See Also:
 
- 
ofArrayReturns an element-value pair for an array-valued element.- Parameters:
- name- the name of the key
- values- the associated values
- Returns:
- an element-value pair for an array-valued element
- See Also:
 
 
-