java.lang.Object
java.lang.Record
org.glavo.classfile.impl.AnnotationImpl.OfEnumImpl
- All Implemented Interfaces:
AnnotationValue,AnnotationValue.OfEnum,ClassfileElement,WritableElement<AnnotationValue>
- Enclosing class:
AnnotationImpl
public static record AnnotationImpl.OfEnumImpl(Utf8Entry className, Utf8Entry constantName)
extends Record
implements AnnotationValue.OfEnum
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.glavo.classfile.AnnotationValue
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 -
Constructor Summary
ConstructorsConstructorDescriptionOfEnumImpl(Utf8Entry className, Utf8Entry constantName) Creates an instance of aOfEnumImplrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theclassNamerecord component.Returns the value of theconstantNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.chartag()final StringtoString()Returns a string representation of this record class.voidWrites the element to the specified writerMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.glavo.classfile.AnnotationValue.OfEnum
classSymbol
-
Constructor Details
-
OfEnumImpl
Creates an instance of aOfEnumImplrecord class.- Parameters:
className- the value for theclassNamerecord componentconstantName- the value for theconstantNamerecord component
-
-
Method Details
-
tag
public char tag()- Specified by:
tagin interfaceAnnotationValue- Returns:
- the tag character for this type as per
-
writeTo
Description copied from interface:WritableElementWrites the element to the specified writer- Specified by:
writeToin interfaceWritableElement<AnnotationValue>- Parameters:
buf- the writer
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
className
Returns the value of theclassNamerecord component.- Specified by:
classNamein interfaceAnnotationValue.OfEnum- Returns:
- the value of the
classNamerecord component
-
constantName
Returns the value of theconstantNamerecord component.- Specified by:
constantNamein interfaceAnnotationValue.OfEnum- Returns:
- the value of the
constantNamerecord component
-