Package org.apache.bcel.classfile
Class EnumElementValue
- java.lang.Object
-
- org.apache.bcel.classfile.ElementValue
-
- org.apache.bcel.classfile.EnumElementValue
-
public class EnumElementValue extends ElementValue
Represents an enum element value in an annotation.- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description private inttypeIdxprivate intvalueIdx-
Fields inherited from class org.apache.bcel.classfile.ElementValue
ANNOTATION, ARRAY, CLASS, cpool, EMPTY_ARRAY, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING, type
-
-
Constructor Summary
Constructors Constructor Description EnumElementValue(int type, int typeIdx, int valueIdx, ConstantPool cpool)Constructs an EnumElementValue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.io.DataOutputStream dos)Dumps this element value to a DataOutputStream.java.lang.StringgetEnumTypeString()Gets the enum type string.java.lang.StringgetEnumValueString()Gets the enum value string.intgetTypeIndex()Gets the type index.intgetValueIndex()Gets the value index.java.lang.StringstringifyValue()Returns a string representation of the element value.-
Methods inherited from class org.apache.bcel.classfile.ElementValue
getConstantPool, getElementValueType, getType, readElementValue, readElementValue, toShortString, toString
-
-
-
-
Constructor Detail
-
EnumElementValue
public EnumElementValue(int type, int typeIdx, int valueIdx, ConstantPool cpool)Constructs an EnumElementValue.- Parameters:
type- the element value type.typeIdx- the type index.valueIdx- the value index.cpool- the constant pool.
-
-
Method Detail
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOExceptionDescription copied from class:ElementValueDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValue- Parameters:
dos- the output stream.- Throws:
java.io.IOException- if an I/O error occurs.
-
getEnumTypeString
public java.lang.String getEnumTypeString()
Gets the enum type string.- Returns:
- the enum type string.
-
getEnumValueString
public java.lang.String getEnumValueString()
Gets the enum value string.- Returns:
- the enum value string.
-
getTypeIndex
public int getTypeIndex()
Gets the type index.- Returns:
- the type index.
-
getValueIndex
public int getValueIndex()
Gets the value index.- Returns:
- the value index.
-
stringifyValue
public java.lang.String stringifyValue()
Description copied from class:ElementValueReturns a string representation of the element value.- Specified by:
stringifyValuein classElementValue- Returns:
- a string representation of the element value.
-
-