Package org.apache.bcel.classfile
Class ElementValuePair
- java.lang.Object
-
- org.apache.bcel.classfile.ElementValuePair
-
public class ElementValuePair extends java.lang.ObjectAn annotation's element value pair.- Since:
- 6.0
-
-
Field Summary
Fields Modifier and Type Field Description private ConstantPoolconstantPoolprivate intelementNameIndexprivate ElementValueelementValue(package private) static ElementValuePair[]EMPTY_ARRAY
-
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.
-
-
-
Field Detail
-
EMPTY_ARRAY
static final ElementValuePair[] EMPTY_ARRAY
-
elementValue
private final ElementValue elementValue
-
constantPool
private final ConstantPool constantPool
-
elementNameIndex
private final int elementNameIndex
-
-
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.IOExceptionDumps this element value pair to a DataOutputStream.- Parameters:
dos- the output stream.- Throws:
java.io.IOException- 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.
-
-