Class ElementValue
- java.lang.Object
- 
- org.apache.tomcat.util.bcel.classfile.ElementValue
 
- 
- Direct Known Subclasses:
- AnnotationElementValue,- ArrayElementValue,- ClassElementValue,- EnumElementValue,- SimpleElementValue
 
 public abstract class ElementValue extends java.lang.ObjectThe element_value structure is documented at https://docs.oracle.com/javase/specs/jvms/se11/html/jvms-4.html#jvms-4.7.16.1element_value { u1 tag; union { u2 const_value_index; { u2 type_name_index; u2 const_name_index; } enum_const_value; u2 class_info_index; annotation annotation_value; { u2 num_values; element_value values[num_values]; } array_value; } value; }
- 
- 
Field SummaryFields Modifier and Type Field Description static byteANNOTATIONstatic byteARRAYstatic byteCLASSstatic byteENUM_CONSTANTstatic bytePRIMITIVE_BOOLEANstatic bytePRIMITIVE_BYTEstatic bytePRIMITIVE_CHARstatic bytePRIMITIVE_DOUBLEstatic bytePRIMITIVE_FLOATstatic bytePRIMITIVE_INTstatic bytePRIMITIVE_LONGstatic bytePRIMITIVE_SHORTstatic byteSTRING
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ElementValuereadElementValue(java.io.DataInput input, ConstantPool cpool)Reads anelement_valueas anElementValue.static ElementValuereadElementValue(java.io.DataInput input, ConstantPool cpool, int arrayNesting)Reads anelement_valueas anElementValue.abstract java.lang.StringstringifyValue()
 
- 
- 
- 
Field Detail- 
STRINGpublic static final byte STRING - See Also:
- Constant Field Values
 
 - 
ENUM_CONSTANTpublic static final byte ENUM_CONSTANT - See Also:
- Constant Field Values
 
 - 
CLASSpublic static final byte CLASS - See Also:
- Constant Field Values
 
 - 
ANNOTATIONpublic static final byte ANNOTATION - See Also:
- Constant Field Values
 
 - 
ARRAYpublic static final byte ARRAY - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_INTpublic static final byte PRIMITIVE_INT - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_BYTEpublic static final byte PRIMITIVE_BYTE - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_CHARpublic static final byte PRIMITIVE_CHAR - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_DOUBLEpublic static final byte PRIMITIVE_DOUBLE - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_FLOATpublic static final byte PRIMITIVE_FLOAT - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_LONGpublic static final byte PRIMITIVE_LONG - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_SHORTpublic static final byte PRIMITIVE_SHORT - See Also:
- Constant Field Values
 
 - 
PRIMITIVE_BOOLEANpublic static final byte PRIMITIVE_BOOLEAN - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
readElementValuepublic static ElementValue readElementValue(java.io.DataInput input, ConstantPool cpool) throws java.io.IOException Reads anelement_valueas anElementValue.- Parameters:
- input- Raw data input.
- cpool- Constant pool.
- Returns:
- a new ElementValue.
- Throws:
- java.io.IOException- if an I/O error occurs.
 
 - 
readElementValuepublic static ElementValue readElementValue(java.io.DataInput input, ConstantPool cpool, int arrayNesting) throws java.io.IOException Reads anelement_valueas anElementValue.- Parameters:
- input- Raw data input.
- cpool- Constant pool.
- arrayNesting- level of current array nesting.
- Returns:
- a new ElementValue.
- Throws:
- java.io.IOException- if an I/O error occurs.
- Since:
- 6.7.0
 
 - 
stringifyValuepublic abstract java.lang.String stringifyValue() 
 
- 
 
-