Package org.apache.bcel.classfile
Class ElementValuePair
java.lang.Object
org.apache.bcel.classfile.ElementValuePair
An annotation's element value pair.
- Since:
- 6.0
-
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.
-
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
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.
-