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
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 Throwable> -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal short
const_name_index
; index of aClassFile.ConstantUtf8Info
giveing the simple name of the enum constant represented by thiselement_value
structure.final short
type_name_index
; index of aClassFile.ConstantUtf8Info
representing a field descriptor. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<R,
EX extends Throwable>
Raccept
(ClassFile.ElementValue.Visitor<R, EX> visitor) Invokes the respective method of theClassFile.ElementValue.Visitor
.byte
getTag()
void
store
(DataOutputStream dos) Writes this element value in an element-value-type dependent way; see JVMS8 4.7.16.1.
-
Field Details
-
typeNameIndex
public final short typeNameIndextype_name_index
; index of aClassFile.ConstantUtf8Info
representing a field descriptor. -
constNameIndex
public final short constNameIndexconst_name_index
; index of aClassFile.ConstantUtf8Info
giveing the simple name of the enum constant represented by thiselement_value
structure.
-
-
Constructor Details
-
EnumConstValue
public EnumConstValue(short typeNameIndex, short constNameIndex) - Parameters:
typeNameIndex
-type_name_index
; index of aClassFile.ConstantUtf8Info
representing a field descriptorconstNameIndex
-const_name_index
; index of aClassFile.ConstantUtf8Info
giveing the simple name of the enum constant represented by thiselement_value
structure
-
-
Method Details
-
getTag
public byte getTag()- Specified by:
getTag
in interfaceClassFile.ElementValue
- Returns:
- The "tag" byte to use when storing this "value" in an "element_value" structure
-
store
Description copied from interface:ClassFile.ElementValue
Writes 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:
store
in interfaceClassFile.ElementValue
- Throws:
IOException
-
accept
@Nullable public <R,EX extends Throwable> R accept(ClassFile.ElementValue.Visitor<R, EX> visitor) throws EXDescription copied from interface:ClassFile.ElementValue
Invokes the respective method of theClassFile.ElementValue.Visitor
.- Specified by:
accept
in interfaceClassFile.ElementValue
- Throws:
EX extends Throwable
-