Package org.apache.bcel.classfile
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 Modifier and Type Field Description private ElementValue[]elementValues-
Fields inherited from class org.apache.bcel.classfile.ElementValue
ANNOTATION, ARRAY, CLASS, cpool, EMPTY_ARRAY, 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.io.DataOutputStream dos)Dumps this element value to a DataOutputStream.ElementValue[]getElementValuesArray()Gets the element values array.intgetElementValuesArraySize()Gets the element values array size.java.lang.StringstringifyValue()Returns a string representation of the element value.java.lang.StringtoString()Returns a string representation of the element value.-
Methods inherited from class org.apache.bcel.classfile.ElementValue
getConstantPool, getElementValueType, getType, readElementValue, readElementValue, toShortString
-
-
-
-
Field Detail
-
elementValues
private final ElementValue[] elementValues
-
-
Constructor Detail
-
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 Detail
-
dump
public void dump(java.io.DataOutputStream dos) throws java.io.IOExceptionDescription copied from class:ElementValueDumps this element value to a DataOutputStream.- Specified by:
dumpin classElementValue- Parameters:
dos- the output stream.- Throws:
java.io.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 java.lang.String stringifyValue()
Description copied from class:ElementValueReturns a string representation of the element value.- Specified by:
stringifyValuein classElementValue- Returns:
- a string representation of the element value.
-
toString
public java.lang.String toString()
Description copied from class:ElementValueReturns a string representation of the element value.- Overrides:
toStringin classElementValue- Returns:
- a string representation of the element value.
-
-