# Uses of Class
org.apache.bcel.classfile.Constant

Packages that use Constant
Package
Description
org.apache.bcel.classfile
Classes that describe the structure of a Java class file and a class file parser.
org.apache.bcel.generic
Generic part of the Apache Byte Code Engineering Library (BCEL), classes to dynamically modify class objects and byte code instructions.

- ## Uses of Constant in org.apache.bcel.classfile

  Subclasses of Constant in org.apache.bcel.classfile
  Modifier and Type
  Class
  Description
  `final class`
  `ConstantClass`
  This class is derived from the abstract `Constant` and represents a reference to a (external) class.
  `class`
  `ConstantCP`
  Abstract super class for Fieldref, Methodref, InterfaceMethodref and InvokeDynamic constants.
  `final class`
  `ConstantDouble`
  This class is derived from the abstract `Constant` and represents a reference to a Double object.
  `final class`
  `ConstantDynamic`
  This class is derived from the abstract `Constant` and represents a reference to a dynamically computed constant.
  `final class`
  `ConstantFieldref`
  This class represents a constant pool reference to a field.
  `final class`
  `ConstantFloat`
  This class is derived from the abstract `Constant` and represents a reference to a float object.
  `final class`
  `ConstantInteger`
  This class is derived from the abstract `Constant` and represents a reference to an int object.
  `final class`
  `ConstantInterfaceMethodref`
  This class represents a constant pool reference to an interface method.
  `final class`
  `ConstantInvokeDynamic`
  This class is derived from the abstract `Constant` and represents a reference to a invoke dynamic.
  `final class`
  `ConstantLong`
  This class is derived from the abstract `Constant` and represents a reference to a long object.
  `final class`
  `ConstantMethodHandle`
  This class is derived from the abstract `Constant` and represents a reference to a method handle.
  `final class`
  `ConstantMethodref`
  This class represents a constant pool reference to a method.
  `final class`
  `ConstantMethodType`
  This class is derived from the abstract `Constant` and represents a reference to a method type.
  `final class`
  `ConstantModule`
  This class is derived from the abstract `Constant` and represents a reference to a module.
  `final class`
  `ConstantNameAndType`
  This class is derived from the abstract `Constant` and represents a reference to the name and signature of a field or method.
  `final class`
  `ConstantPackage`
  This class is derived from the abstract `Constant` and represents a reference to a package.
  `final class`
  `ConstantString`
  This class is derived from the abstract `Constant` and represents a reference to a String object.
  `final class`
  `ConstantUtf8`
  Extends the abstract `Constant` to represent a reference to a UTF-8 encoded string.
  Classes in org.apache.bcel.classfile that implement interfaces with type arguments of type Constant
  Modifier and Type
  Class
  Description
  `class`
  `ConstantPool`
  This class represents the constant pool, that is, a table of constants, of a parsed classfile.
  Methods in org.apache.bcel.classfile with type parameters of type Constant
  Modifier and Type
  Method
  Description
  `<T extends Constant>
  T`
  ConstantPool.`getConstant(int index)`
  Gets constant from constant pool.
  `<T extends Constant>
  T`
  ConstantPool.`getConstant(int index, byte tag)`
  Gets constant from constant pool and check whether it has the expected type.
  `<T extends Constant>
  T`
  ConstantPool.`getConstant(int index, byte tag, Class<T> castTo)`
  Gets constant from constant pool and check whether it has the expected type.
  `<T extends Constant>
  T`
  ConstantPool.`getConstant(int index, Class<T> castTo)`
  Gets constant from constant pool.
  Methods in org.apache.bcel.classfile that return Constant
  Modifier and Type
  Method
  Description
  `Constant`
  Constant.`copy()`
  Creates a deep copy of this constant.
  `Constant[]`
  ConstantPool.`getConstantPool()`
  Gets the array of constants.
  `static Constant`
  Constant.`readConstant(DataInput dataInput)`
  Reads one constant from the given input, the type depends on a tag byte.
  Methods in org.apache.bcel.classfile that return types with arguments of type Constant
  Modifier and Type
  Method
  Description
  `static BCELComparator<Constant>`
  Constant.`getComparator()`
  Gets the comparison strategy object.
  `Iterator<Constant>`
  ConstantPool.`iterator()`
  Methods in org.apache.bcel.classfile with parameters of type Constant
  Modifier and Type
  Method
  Description
  `String`
  ConstantPool.`constantToString(Constant c)`
  Resolves constant to a string representation.
  `void`
  ConstantPool.`setConstant(int index, Constant constant)`
  Sets a constant at the specified index.
  `void`
  ConstantPool.`setConstantPool(Constant[] constantPool)`
  Sets the constant pool.
  Method parameters in org.apache.bcel.classfile with type arguments of type Constant
  Modifier and Type
  Method
  Description
  `static void`
  Constant.`setComparator(BCELComparator<Constant> comparator)`
  Sets the comparison strategy object.
  Constructors in org.apache.bcel.classfile with parameters of type Constant
  Modifier
  Constructor
  Description
  ``
  `ConstantPool(Constant... constantPool)`
  Constructs a ConstantPool.

- ## Uses of Constant in org.apache.bcel.generic

  Fields in org.apache.bcel.generic declared as Constant
  Modifier and Type
  Field
  Description
  `protected Constant[]`
  ConstantPoolGen.`constants`
  Deprecated.
  (since 6.0) will be made private; do not access directly, use getter/setter
  Methods in org.apache.bcel.generic that return Constant
  Modifier and Type
  Method
  Description
  `Constant`
  ConstantPoolGen.`getConstant(int i)`
  Gets a constant pool entry at the specified index.
  Methods in org.apache.bcel.generic with parameters of type Constant
  Modifier and Type
  Method
  Description
  `int`
  ConstantPoolGen.`addConstant(Constant constant, ConstantPoolGen cpGen)`
  Adds a constant from another ConstantPool and returns the new index.
  `void`
  ConstantPoolGen.`setConstant(int i, Constant c)`
  Use with care!
  Constructors in org.apache.bcel.generic with parameters of type Constant
  Modifier
  Constructor
  Description
  ``
  `ConstantPoolGen(Constant[] cs)`
  Constructs a new instance with the given array of constants.