Class ClassElementValue

java.lang.Object
org.apache.bcel.classfile.ElementValue
org.apache.bcel.classfile.ClassElementValue

public class ClassElementValue extends ElementValue
Represents a class element value in an annotation.
Since:
6.0
  • Field Details

    • idx

      private final int idx
  • Constructor Details

    • ClassElementValue

      public ClassElementValue(int type, int idx, ConstantPool cpool)
      Constructs a ClassElementValue.
      Parameters:
      type - The type.
      idx - The index.
      cpool - The constant pool.
  • Method Details

    • dump

      public void dump(DataOutputStream dos) throws IOException
      Description copied from class: ElementValue
      Dumps this element value to a DataOutputStream.
      Specified by:
      dump in class ElementValue
      Parameters:
      dos - The output stream.
      Throws:
      IOException - Thrown if an I/O error occurs.
    • getClassString

      public String getClassString()
      Gets the class string.
      Returns:
      The class string.
    • getIndex

      public int getIndex()
      Gets the index.
      Returns:
      The index.
    • stringifyValue

      public String stringifyValue()
      Description copied from class: ElementValue
      Returns a string representation of the element value.
      Specified by:
      stringifyValue in class ElementValue
      Returns:
      A string representation of the element value.