Package org.apache.bcel.classfile
Class ElementValuePair
java.lang.Object
org.apache.bcel.classfile.ElementValuePair
An annotation's element value pair.
- Since:
- 6.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ConstantPoolprivate final intprivate final ElementValue(package private) static final ElementValuePair[] -
Constructor Summary
ConstructorsConstructorDescriptionElementValuePair(int elementNameIndex, ElementValue elementValue, ConstantPool constantPool) Constructs an ElementValuePair. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddump(DataOutputStream dos) Dumps this element value pair to a DataOutputStream.intGets the name index.Gets the name string.final ElementValuegetValue()Gets the value.Gets a short string representation.
-
Field Details
-
EMPTY_ARRAY
-
elementValue
-
constantPool
-
elementNameIndex
private final int elementNameIndex
-
-
Constructor Details
-
ElementValuePair
Constructs an ElementValuePair.- Parameters:
elementNameIndex- The element name index.elementValue- The element value.constantPool- The constant pool.
-
-
Method Details
-
dump
Dumps this element value pair to a DataOutputStream.- Parameters:
dos- The output stream.- Throws:
IOException- Thrown if an I/O error occurs.
-
getNameIndex
public int getNameIndex()Gets the name index.- Returns:
- The name index.
-
getNameString
Gets the name string.- Returns:
- The name string.
-
getValue
Gets the value.- Returns:
- The element value.
-
toShortString
Gets a short string representation.- Returns:
- A short string representation.
-