# 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 Summary

  ### Fields inherited from class ElementValue

  `ANNOTATION, ARRAY, CLASS, cpool, ENUM_CONSTANT, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_LONG, PRIMITIVE_SHORT, STRING, type`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ArrayElementValue(int type, ElementValue[] elementValues, ConstantPool cpool)`
  Constructs an ArrayElementValue.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `dump(DataOutputStream dos)`
  Dumps this element value to a DataOutputStream.
  `ElementValue[]`
  `getElementValuesArray()`
  Gets the element values array.
  `int`
  `getElementValuesArraySize()`
  Gets the element values array size.
  `String`
  `stringifyValue()`
  Returns a string representation of the element value.
  `String`
  `toString()`
  Returns a string representation of the element value.

  ### Methods inherited from class ElementValue

  `getElementValueType, readElementValue, readElementValue, toShortString`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## 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` - 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.