Class ArrayElementValue

java.lang.Object
org.apache.bcel.classfile.ElementValue
org.apache.bcel.classfile.ArrayElementValue

public class ArrayElementValue extends ElementValue
Represents an array element value in an annotation.
Since:
6.0
  • Field Details

    • elementValues

      private final ElementValue[] elementValues
  • Constructor Details

    • ArrayElementValue

      public ArrayElementValue(int type, ElementValue[] elementValues, ConstantPool cpool)
      Constructs an ArrayElementValue.
      Parameters:
      type - The type.
      elementValues - The element values.
      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.
    • getElementValuesArray

      public ElementValue[] getElementValuesArray()
      Gets the element values array.
      Returns:
      The element values array.
    • getElementValuesArraySize

      public int getElementValuesArraySize()
      Gets the element values array size.
      Returns:
      The element values array size.
    • 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.
    • toString

      public 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.