Record Class AnnotationsReader.AnnotationAttribute
java.lang.Object
java.lang.Record
com.ibm.wala.shrike.shrikeCT.AnnotationsReader.AnnotationAttribute
- Record Components:
type- the type of the annotationelementValues- the arguments to the annotation
- All Implemented Interfaces:
AnnotationsReader.ElementValue
- Enclosing class:
AnnotationsReader
public static record AnnotationsReader.AnnotationAttribute(String type, Map<String, AnnotationsReader.ElementValue> elementValues)
extends Record
implements AnnotationsReader.ElementValue
Representation of an annotation attribute. An annotation has the following format in the
bytecode:
annotation {
u2 type_index;
u2 num_element_value_pairs;
{ u2 element_name_index;
element_value value;
} element_value_pairs[num_element_value_pairs];
See the JVM specification section 4.7.16 for details.
This class implements AnnotationsReader.ElementValue to handle nested annotations.
- Author:
- sjfink
-
Constructor Summary
ConstructorsConstructorDescriptionAnnotationAttribute(String type, Map<String, AnnotationsReader.ElementValue> elementValues) Creates an instance of aAnnotationAttributerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theelementValuesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.toString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
AnnotationAttribute
Creates an instance of aAnnotationAttributerecord class.- Parameters:
type- the value for thetyperecord componentelementValues- the value for theelementValuesrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
type
-
elementValues
Returns the value of theelementValuesrecord component.- Returns:
- the value of the
elementValuesrecord component
-