Class ClassElementValueGen

java.lang.Object
org.apache.bcel.generic.ElementValueGen
org.apache.bcel.generic.ClassElementValueGen

public class ClassElementValueGen extends ElementValueGen
Generates class element values in annotations.
Since:
6.0
  • Field Details

    • idx

      private final int idx
  • Constructor Details

    • ClassElementValueGen

      public ClassElementValueGen(ClassElementValue value, ConstantPoolGen cpool, boolean copyPoolEntries)
      Constructs a ClassElementValueGen.
      Parameters:
      value - The class element value.
      cpool - The constant pool generator.
      copyPoolEntries - whether to copy pool entries.
    • ClassElementValueGen

      protected ClassElementValueGen(int typeIdx, ConstantPoolGen cpool)
      Constructs a ClassElementValueGen.
      Parameters:
      typeIdx - The type index.
      cpool - The constant pool generator.
    • ClassElementValueGen

      public ClassElementValueGen(ObjectType t, ConstantPoolGen cpool)
      Constructs a ClassElementValueGen.
      Parameters:
      t - The object type.
      cpool - The constant pool generator.
  • Method Details

    • dump

      public void dump(DataOutputStream dos) throws IOException
      Description copied from class: ElementValueGen
      Dumps this element value to a DataOutputStream.
      Specified by:
      dump in class ElementValueGen
      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.
    • getElementValue

      public ElementValue getElementValue()
      Return immutable variant of this ClassElementValueGen.
      Specified by:
      getElementValue in class ElementValueGen
      Returns:
      immutable variant of this ClassElementValueGen.
    • getIndex

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

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