Class ElementValuePair

java.lang.Object
org.apache.bcel.classfile.ElementValuePair

public class ElementValuePair extends Object
An annotation's element value pair.
Since:
6.0
  • Constructor Details

    • 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 Details

    • dump

      protected void dump(DataOutputStream dos) throws IOException
      Dumps this element value pair to a DataOutputStream.
      Parameters:
      dos - the output stream.
      Throws:
      IOException - 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

      public final ElementValue getValue()
      Gets the value.
      Returns:
      the element value.
    • toShortString

      Gets a short string representation.
      Returns:
      a short string representation.