Class SimpleElementValue

    • Constructor Detail

      • SimpleElementValue

        public SimpleElementValue​(int type,
                                  int index,
                                  ConstantPool cpool)
        Constructs a SimpleElementValue.
        Parameters:
        type - The element value type.
        index - The index into the constant pool.
        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 - Thrown if an I/O error occurs.
      • getIndex

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

        public boolean getValueBoolean()
        Gets the boolean value.
        Returns:
        The boolean value.
      • getValueByte

        public byte getValueByte()
        Gets the byte value.
        Returns:
        The byte value.
      • getValueChar

        public char getValueChar()
        Gets the char value.
        Returns:
        The char value.
      • getValueDouble

        public double getValueDouble()
        Gets the double value.
        Returns:
        The double value.
      • getValueFloat

        public float getValueFloat()
        Gets the float value.
        Returns:
        The float value.
      • getValueInt

        public int getValueInt()
        Gets the int value.
        Returns:
        The int value.
      • getValueLong

        public long getValueLong()
        Gets the long value.
        Returns:
        The long value.
      • getValueShort

        public short getValueShort()
        Gets the short value.
        Returns:
        The short value.
      • getValueString

        public java.lang.String getValueString()
        Gets the string value.
        Returns:
        The string value.
      • setIndex

        public void setIndex​(int index)
        Sets the index into the constant pool.
        Parameters:
        index - The 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.