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 Details

    • typeIdx

      private final int typeIdx
    • valueIdx

      private final int valueIdx
  • Constructor Details

    • 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 Details

    • dump

      public void dump(DataOutputStream dos) throws IOException
      Description copied from class: ElementValue
      Dumps this element value to a DataOutputStream.
      Specified by:
      dump in class ElementValue
      Parameters:
      dos - The output stream.
      Throws:
      IOException - Thrown if an I/O error occurs.
    • getEnumTypeString

      public String getEnumTypeString()
      Gets the enum type string.
      Returns:
      The enum type string.
    • getEnumValueString

      public 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 String stringifyValue()
      Description copied from class: ElementValue
      Returns a string representation of the element value.
      Specified by:
      stringifyValue in class ElementValue
      Returns:
      A string representation of the element value.