Class ElementValuePairGen
java.lang.Object
org.apache.bcel.generic.ElementValuePairGen
Generates element value pairs in annotations.
- Since:
- 6.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedElementValuePairGen(int idx, ElementValueGen value, ConstantPoolGen cpool) Constructs an ElementValuePairGen.ElementValuePairGen(String name, ElementValueGen value, ConstantPoolGen cpool) Constructs an ElementValuePairGen.ElementValuePairGen(ElementValuePair nvp, ConstantPoolGen cpool, boolean copyPoolEntries) Constructs an ElementValuePairGen from an ElementValuePair. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddump(DataOutputStream dos) Dumps this element value pair to a DataOutputStream.Retrieves an immutable version of this ElementValuePairGen.intGets the name index.final StringGets the name string.final ElementValueGengetValue()Gets the value.toString()
-
Constructor Details
-
ElementValuePairGen
Constructs an ElementValuePairGen from an ElementValuePair.- Parameters:
nvp- the element value pair.cpool- the constant pool.copyPoolEntries- whether to copy pool entries.
-
ElementValuePairGen
Constructs an ElementValuePairGen.- Parameters:
idx- the name index.value- the element value.cpool- the constant pool.
-
ElementValuePairGen
Constructs an ElementValuePairGen.- Parameters:
name- the name.value- the element value.cpool- the constant pool.
-
-
Method Details
-
dump
Dumps this element value pair to a DataOutputStream.- Parameters:
dos- the output stream.- Throws:
IOException- if an I/O error occurs.
-
getElementNameValuePair
Retrieves an immutable version of this ElementValuePairGen.- Returns:
- an immutable ElementValuePair.
-
getNameIndex
-
getNameString
-
getValue
-
toString
-