public abstract class ElementValue extends Object
element_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; }
Modifier and Type | Field and Description |
---|---|
static byte |
ANNOTATION |
static byte |
ARRAY |
static byte |
CLASS |
protected ConstantPool |
cpool
Deprecated.
(since 6.0) will be made private and final; do not access directly, use getter
|
static byte |
ENUM_CONSTANT |
static byte |
PRIMITIVE_BOOLEAN |
static byte |
PRIMITIVE_BYTE |
static byte |
PRIMITIVE_CHAR |
static byte |
PRIMITIVE_DOUBLE |
static byte |
PRIMITIVE_FLOAT |
static byte |
PRIMITIVE_INT |
static byte |
PRIMITIVE_LONG |
static byte |
PRIMITIVE_SHORT |
static byte |
STRING |
protected int |
type
Deprecated.
(since 6.0) will be made private and final; do not access directly, use getter
|
Modifier | Constructor and Description |
---|---|
protected |
ElementValue(int type,
ConstantPool cpool) |
Modifier and Type | Method and Description |
---|---|
abstract void |
dump(DataOutputStream dos) |
int |
getElementValueType() |
static ElementValue |
readElementValue(DataInput input,
ConstantPool cpool)
Reads an
element_value as an ElementValue . |
static ElementValue |
readElementValue(DataInput input,
ConstantPool cpool,
int arrayNesting)
Reads an
element_value as an ElementValue . |
abstract String |
stringifyValue() |
String |
toShortString() |
String |
toString() |
public static final byte STRING
public static final byte ENUM_CONSTANT
public static final byte CLASS
public static final byte ANNOTATION
public static final byte ARRAY
public static final byte PRIMITIVE_INT
public static final byte PRIMITIVE_BYTE
public static final byte PRIMITIVE_CHAR
public static final byte PRIMITIVE_DOUBLE
public static final byte PRIMITIVE_FLOAT
public static final byte PRIMITIVE_LONG
public static final byte PRIMITIVE_SHORT
public static final byte PRIMITIVE_BOOLEAN
@Deprecated protected int type
@Deprecated protected ConstantPool cpool
protected ElementValue(int type, ConstantPool cpool)
public static ElementValue readElementValue(DataInput input, ConstantPool cpool) throws IOException
element_value
as an ElementValue
.input
- Raw data input.cpool
- Constant pool.IOException
- if an I/O error occurs.public static ElementValue readElementValue(DataInput input, ConstantPool cpool, int arrayNesting) throws IOException
element_value
as an ElementValue
.input
- Raw data input.cpool
- Constant pool.arrayNesting
- level of current array nesting.IOException
- if an I/O error occurs.public abstract void dump(DataOutputStream dos) throws IOException
IOException
public int getElementValueType()
public abstract String stringifyValue()
public String toShortString()
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.