Package org.apache.bcel.classfile
Class ElementValuePair
- java.lang.Object
-
- org.apache.bcel.classfile.ElementValuePair
-
public class ElementValuePair extends java.lang.Object
An annotation's element value pair.- Since:
- 6.0
-
-
Constructor Summary
Constructors Constructor Description ElementValuePair(int elementNameIndex, ElementValue elementValue, ConstantPool constantPool)Constructs an ElementValuePair.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddump(java.io.DataOutputStream dos)Dumps this element value pair to a DataOutputStream.intgetNameIndex()Gets the name index.java.lang.StringgetNameString()Gets the name string.ElementValuegetValue()Gets the value.java.lang.StringtoShortString()Gets a short string representation.
-
-
-
Constructor Detail
-
ElementValuePair
public ElementValuePair(int elementNameIndex, ElementValue elementValue, ConstantPool constantPool)
Constructs an ElementValuePair.- Parameters:
elementNameIndex- The element name index.elementValue- The element value.constantPool- The constant pool.
-
-
Method Detail
-
dump
protected void dump(java.io.DataOutputStream dos) throws java.io.IOException
Dumps this element value pair to a DataOutputStream.- Parameters:
dos- The output stream.- Throws:
java.io.IOException- Thrown if an I/O error occurs.
-
getNameIndex
public int getNameIndex()
Gets the name index.- Returns:
- The name index.
-
getNameString
public java.lang.String getNameString()
Gets the name string.- Returns:
- The name string.
-
getValue
public final ElementValue getValue()
Gets the value.- Returns:
- The element value.
-
toShortString
public java.lang.String toShortString()
Gets a short string representation.- Returns:
- A short string representation.
-
-