Class SimpleElementValue


  • public class SimpleElementValue
    extends ElementValue
    Represents a simple element value in an annotation.
    Since:
    6.0
    • Field Detail

      • index

        private int index
    • Constructor Detail

      • SimpleElementValue

        public SimpleElementValue​(int type,
                                  int index,
                                  ConstantPool cpool)
    • 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.
      • getIndex

        public int getIndex()
        Returns:
        Value entry index in the constant pool.
      • getValueBoolean

        public boolean getValueBoolean()
      • getValueByte

        public byte getValueByte()
      • getValueChar

        public char getValueChar()
      • getValueDouble

        public double getValueDouble()
      • getValueFloat

        public float getValueFloat()
      • getValueInt

        public int getValueInt()
      • getValueLong

        public long getValueLong()
      • getValueShort

        public short getValueShort()
      • getValueString

        public java.lang.String getValueString()
      • setIndex

        public void setIndex​(int 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.
      • toString

        public java.lang.String toString()
        Description copied from class: ElementValue
        Returns a string representation of the element value.
        Overrides:
        toString in class ElementValue
        Returns:
        a string representation of the element value.