Package org.codehaus.janino.util
Class ClassFile.EnumConstValue
- java.lang.Object
-
- org.codehaus.janino.util.ClassFile.EnumConstValue
-
- All Implemented Interfaces:
ClassFile.ElementValue
- Enclosing class:
- ClassFile
public static final class ClassFile.EnumConstValue extends java.lang.Object implements ClassFile.ElementValue
Representation of the "enum_const_value" element in the "element_value" structure.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.codehaus.janino.util.ClassFile.ElementValue
ClassFile.ElementValue.Visitor<R,EX extends java.lang.Throwable>
-
-
Field Summary
Fields Modifier and Type Field Description shortconstNameIndexconst_name_index; index of aClassFile.ConstantUtf8Infogiveing the simple name of the enum constant represented by thiselement_valuestructure.shorttypeNameIndextype_name_index; index of aClassFile.ConstantUtf8Inforepresenting a field descriptor.
-
Constructor Summary
Constructors Constructor Description EnumConstValue(short typeNameIndex, short constNameIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R,EX extends java.lang.Throwable>
Raccept(ClassFile.ElementValue.Visitor<R,EX> visitor)Invokes the respective method of theClassFile.ElementValue.Visitor.bytegetTag()voidstore(java.io.DataOutputStream dos)Writes this element value in an element-value-type dependent way; see JVMS8 4.7.16.1.
-
-
-
Field Detail
-
typeNameIndex
public final short typeNameIndex
type_name_index; index of aClassFile.ConstantUtf8Inforepresenting a field descriptor.
-
constNameIndex
public final short constNameIndex
const_name_index; index of aClassFile.ConstantUtf8Infogiveing the simple name of the enum constant represented by thiselement_valuestructure.
-
-
Constructor Detail
-
EnumConstValue
public EnumConstValue(short typeNameIndex, short constNameIndex)- Parameters:
typeNameIndex-type_name_index; index of aClassFile.ConstantUtf8Inforepresenting a field descriptorconstNameIndex-const_name_index; index of aClassFile.ConstantUtf8Infogiveing the simple name of the enum constant represented by thiselement_valuestructure
-
-
Method Detail
-
getTag
public byte getTag()
- Specified by:
getTagin interfaceClassFile.ElementValue- Returns:
- The "tag" byte to use when storing this "value" in an "element_value" structure
-
store
public void store(java.io.DataOutputStream dos) throws java.io.IOExceptionDescription copied from interface:ClassFile.ElementValueWrites this element value in an element-value-type dependent way; see JVMS8 4.7.16.1. The "tag" byte is snot part of this writing!- Specified by:
storein interfaceClassFile.ElementValue- Throws:
java.io.IOException
-
accept
@Nullable public <R,EX extends java.lang.Throwable> R accept(ClassFile.ElementValue.Visitor<R,EX> visitor) throws EX extends java.lang.Throwable
Description copied from interface:ClassFile.ElementValueInvokes the respective method of theClassFile.ElementValue.Visitor.- Specified by:
acceptin interfaceClassFile.ElementValue- Throws:
EX extends java.lang.Throwable
-
-