Class EnumElementValue


  • public class EnumElementValue
    extends ElementValue
    Represents an enum element value in an annotation.
    Since:
    6.0
    • Field Detail

      • typeIdx

        private final int typeIdx
      • valueIdx

        private final int valueIdx
    • 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.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:
        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: ElementValue
        Returns a string representation of the element value.
        Specified by:
        stringifyValue in class ElementValue
        Returns:
        a string representation of the element value.