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

Packages that use ConstantPool
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.
org.apache.bcel.verifier.statics
PassVerifier classes used internally by JustIce.

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

  Fields in org.apache.bcel.classfile declared as ConstantPool
  Modifier and Type
  Field
  Description
  `protected ConstantPool`
  Attribute.`constant_pool`
  Deprecated.
  (since 6.0) will be made private; do not access directly, use getter/setter.
  `protected ConstantPool`
  FieldOrMethod.`constant_pool`
  Deprecated.
  (since 6.0) will be made private; do not access directly, use getter/setter.
  `protected ConstantPool`
  ElementValue.`cpool`
  Deprecated.
  (since 6.0) will be made private and final; do not access directly, use getter.
  Methods in org.apache.bcel.classfile that return ConstantPool
  Modifier and Type
  Method
  Description
  `ConstantPool`
  ConstantPool.`copy()`
  Creates a deep copy of this constant pool.
  `ConstantPool`
  AnnotationEntry.`getConstantPool()`
  Gets the constant pool.
  `final ConstantPool`
  Attribute.`getConstantPool()`
  Gets the constant pool used by this object.
  `final ConstantPool`
  FieldOrMethod.`getConstantPool()`
  Gets the constant pool used by this object.
  `ConstantPool`
  JavaClass.`getConstantPool()`
  Gets the constant pool.
  `ConstantPool`
  LocalVariable.`getConstantPool()`
  Gets the constant pool used by this object.
  `ConstantPool`
  RecordComponentInfo.`getConstantPool()`
  Gets the constant pool.
  `ConstantPool`
  StackMapEntry.`getConstantPool()`
  `ConstantPool`
  StackMapType.`getConstantPool()`
  Methods in org.apache.bcel.classfile with parameters of type ConstantPool
  Modifier and Type
  Method
  Description
  `static String`
  Utility.`codeToString(byte[] code, ConstantPool constantPool, int index, int length)`
  `static String`
  Utility.`codeToString(byte[] code, ConstantPool constantPool, int index, int length, boolean verbose)`
  Disassemble a byte array of JVM byte codes starting from code line 'index' and return the disassembled string representation.
  `static String`
  Utility.`codeToString(ByteSequence bytes, ConstantPool constantPool)`
  `static String`
  Utility.`codeToString(ByteSequence bytes, ConstantPool constantPool, boolean verbose)`
  Disassemble a stream of byte codes and return the string representation.
  `Attribute`
  AnnotationDefault.`copy(ConstantPool constantPool)`
  `Attribute`
  Annotations.`copy(ConstantPool constantPool)`
  `abstract Attribute`
  Attribute.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `BootstrapMethods`
  BootstrapMethods.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Code.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  ConstantValue.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Deprecated.`copy(ConstantPool constantPool)`
  `Attribute`
  EnclosingMethod.`copy(ConstantPool constantPool)`
  `Attribute`
  ExceptionTable.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Field`
  Field.`copy(ConstantPool constantPool)`
  Creates a deep copy of this field.
  `Attribute`
  InnerClasses.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  LineNumberTable.`copy(ConstantPool constantPool)`
  `Attribute`
  LocalVariableTable.`copy(ConstantPool constantPool)`
  `Attribute`
  LocalVariableTypeTable.`copy(ConstantPool constantPool)`
  `Method`
  Method.`copy(ConstantPool constantPool)`
  Creates a deep copy of this method.
  `Attribute`
  MethodParameters.`copy(ConstantPool constantPool)`
  `Attribute`
  Module.`copy(ConstantPool constantPool)`
  `Attribute`
  ModuleMainClass.`copy(ConstantPool constantPool)`
  `Attribute`
  ModulePackages.`copy(ConstantPool constantPool)`
  `Attribute`
  NestHost.`copy(ConstantPool constantPool)`
  `Attribute`
  NestMembers.`copy(ConstantPool constantPool)`
  `Attribute`
  ParameterAnnotations.`copy(ConstantPool constantPool)`
  `Attribute`
  PMGClass.`copy(ConstantPool constantPool)`
  `Attribute`
  Record.`copy(ConstantPool constantPool)`
  Copies this instance and its components.
  `Attribute`
  RuntimeInvisibleAnnotations.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  RuntimeVisibleAnnotations.`copy(ConstantPool constantPool)`
  Creates a deep copy of this attribute.
  `Attribute`
  Signature.`copy(ConstantPool constantPool)`
  `Attribute`
  SourceFile.`copy(ConstantPool constantPool)`
  `Attribute`
  StackMap.`copy(ConstantPool constantPool)`
  `Attribute`
  Synthetic.`copy(ConstantPool constantPool)`
  `Attribute`
  Unknown.`copy(ConstantPool constantPool)`
  `protected FieldOrMethod`
  FieldOrMethod.`copy_(ConstantPool constantPool)`
  Creates a deep copy of this field.
  `Attribute`
  AttributeReader.`createAttribute(int nameIndex, int length, DataInputStream file, ConstantPool constantPool)`
  Deprecated.
  When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it.
  `Attribute`
  UnknownAttributeReader.`createAttribute(int nameIndex, int length, DataInput file, ConstantPool constantPool)`
  When this attribute reader is added via the static method Attribute.addAttributeReader, an attribute name is associated with it.
  `String`
  ConstantClass.`getBytes(ConstantPool cp)`
  Gets the dereferenced string.
  `String`
  ConstantModule.`getBytes(ConstantPool cp)`
  Gets the dereferenced string.
  `String`
  ConstantPackage.`getBytes(ConstantPool cp)`
  Gets the dereferenced string.
  `String`
  ConstantString.`getBytes(ConstantPool cp)`
  Gets the dereferenced string.
  `String`
  ConstantCP.`getClass(ConstantPool cp)`
  Gets the class this field belongs to.
  `Object`
  ConstantClass.`getConstantValue(ConstantPool cp)`
  Gets the String object.
  `Object`
  ConstantDouble.`getConstantValue(ConstantPool cp)`
  Gets the Double object.
  `Object`
  ConstantFloat.`getConstantValue(ConstantPool cp)`
  Gets the Float object.
  `Object`
  ConstantInteger.`getConstantValue(ConstantPool cp)`
  Gets the Integer object.
  `Object`
  ConstantLong.`getConstantValue(ConstantPool cp)`
  Gets the Long object.
  `Object`
  ConstantModule.`getConstantValue(ConstantPool cp)`
  Gets the String object.
  `Object`
  ConstantObject.`getConstantValue(ConstantPool constantPool)`
  Gets the object representing the constant, for example, Long for ConstantLong.
  `Object`
  ConstantPackage.`getConstantValue(ConstantPool cp)`
  Gets the String object.
  `Object`
  ConstantString.`getConstantValue(ConstantPool cp)`
  Gets the String object.
  `String[]`
  ModuleProvides.`getImplementationClassNames(ConstantPool constantPool, boolean compactClassName)`
  Gets the array of implementation class names for this ModuleProvides.
  `String`
  ModuleProvides.`getInterfaceName(ConstantPool constantPool)`
  Gets the interface name for this ModuleProvides.
  `String`
  Module.`getModuleName(ConstantPool cp)`
  Gets module name.
  `String`
  ModuleRequires.`getModuleName(ConstantPool constantPool)`
  Gets the module name from the constant pool.
  `String`
  ConstantNameAndType.`getName(ConstantPool cp)`
  Gets the name.
  `String`
  ModuleExports.`getPackageName(ConstantPool constantPool)`
  Gets the exported package name.
  `String`
  ModuleOpens.`getPackageName(ConstantPool constantPool)`
  Gets the opened package name.
  `String`
  MethodParameter.`getParameterName(ConstantPool constantPool)`
  Gets the name of the parameter.
  `String`
  ConstantNameAndType.`getSignature(ConstantPool cp)`
  Gets the signature.
  `String[]`
  ModuleExports.`getToModuleNames(ConstantPool constantPool)`
  Gets an array of module names for this ModuleExports.
  `String[]`
  ModuleOpens.`getToModuleNames(ConstantPool constantPool)`
  Gets an array of module names for this ModuleOpens.
  `String[]`
  Module.`getUsedClassNames(ConstantPool constantPool, boolean compactClassName)`
  Gets the array of class names for this module's uses.
  `String`
  Module.`getVersion(ConstantPool cp)`
  Gets version for this module.
  `String`
  ModuleRequires.`getVersion(ConstantPool constantPool)`
  Gets the required version from the constant pool.
  `static AnnotationEntry`
  AnnotationEntry.`read(DataInput input, ConstantPool constantPool, boolean isRuntimeVisible)`
  Factory method to create an AnnotionEntry from a DataInput.
  `static Attribute`
  Attribute.`readAttribute(DataInput dataInput, ConstantPool constantPool)`
  Class method reads one attribute from the input data stream.
  `static Attribute`
  Attribute.`readAttribute(DataInputStream dataInputStream, ConstantPool constantPool)`
  Class method reads one attribute from the input data stream.
  `static ElementValue`
  ElementValue.`readElementValue(DataInput input, ConstantPool cpool)`
  Reads an `element_value` as an `ElementValue`.
  `static ElementValue`
  ElementValue.`readElementValue(DataInput input, ConstantPool cpool, int arrayNesting)`
  Reads an `element_value` as an `ElementValue`.
  `final void`
  Attribute.`setConstantPool(ConstantPool constantPool)`
  Sets the constant pool to be used for this object.
  `final void`
  FieldOrMethod.`setConstantPool(ConstantPool constantPool)`
  Sets the constant pool to be used for this object.
  `void`
  JavaClass.`setConstantPool(ConstantPool constantPool)`
  Sets the constant pool.
  `void`
  LocalVariable.`setConstantPool(ConstantPool constantPool)`
  Sets the constant pool to be used for this object.
  `void`
  StackMapEntry.`setConstantPool(ConstantPool constantPool)`
  `void`
  StackMapType.`setConstantPool(ConstantPool constantPool)`
  `final String`
  BootstrapMethod.`toString(ConstantPool constantPool)`
  Gets a resolved string representation.
  `String`
  CodeException.`toString(ConstantPool cp)`
  Gets a string representation with constant pool.
  `String`
  CodeException.`toString(ConstantPool cp, boolean verbose)`
  Gets a string representation with constant pool.
  `String`
  InnerClass.`toString(ConstantPool constantPool)`
  Gets the resolved string representation.
  `String`
  ModuleExports.`toString(ConstantPool constantPool)`
  `String`
  ModuleOpens.`toString(ConstantPool constantPool)`
  `String`
  ModuleProvides.`toString(ConstantPool constantPool)`
  `String`
  ModuleRequires.`toString(ConstantPool constantPool)`
  `void`
  DescendingVisitor.`visitConstantPool(ConstantPool cp)`
  `void`
  EmptyVisitor.`visitConstantPool(ConstantPool obj)`
  `void`
  Visitor.`visitConstantPool(ConstantPool obj)`
  Visits a ConstantPool.
  Constructors in org.apache.bcel.classfile with parameters of type ConstantPool
  Modifier
  Constructor
  Description
  ``
  `AnnotationDefault(int nameIndex, int length, ElementValue defaultValue, ConstantPool constantPool)`
  Constructs an AnnotationDefault attribute.
  ``
  `AnnotationElementValue(int type, AnnotationEntry annotationEntry, ConstantPool cpool)`
  Constructs an AnnotationElementValue.
  ``
  `AnnotationEntry(int typeIndex, ConstantPool constantPool, boolean isRuntimeVisible)`
  Constructs an AnnotationEntry.
  ``
  `Annotations(byte annotationType, int nameIndex, int length, AnnotationEntry[] annotationTable, ConstantPool constantPool, boolean isRuntimeVisible)`
  Constructs an instance.
  ``
  `ArrayElementValue(int type, ElementValue[] elementValues, ConstantPool cpool)`
  Constructs an ArrayElementValue.
  `protected`
  `Attribute(byte tag, int nameIndex, int length, ConstantPool constantPool)`
  Constructs an instance.
  ``
  `BootstrapMethods(int nameIndex, int length, BootstrapMethod[] bootstrapMethods, ConstantPool constantPool)`
  Constructs a BootstrapMethods attribute.
  ``
  `ClassElementValue(int type, int idx, ConstantPool cpool)`
  Constructs a ClassElementValue.
  ``
  `Code(int nameIndex, int length, int maxStack, int maxLocals, byte[] code, CodeException[] exceptionTable, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Code attribute.
  ``
  `ConstantValue(int nameIndex, int length, int constantValueIndex, ConstantPool constantPool)`
  Constructs a ConstantValue.
  ``
  `Deprecated(int nameIndex, int length, byte[] bytes, ConstantPool constantPool)`
  Constructs a Deprecated attribute.
  `protected`
  `ElementValue(int type, ConstantPool cpool)`
  Constructs an ElementValue.
  ``
  `ElementValuePair(int elementNameIndex, ElementValue elementValue, ConstantPool constantPool)`
  Constructs an ElementValuePair.
  ``
  `EnumElementValue(int type, int typeIdx, int valueIdx, ConstantPool cpool)`
  Constructs an EnumElementValue.
  ``
  `ExceptionTable(int nameIndex, int length, int[] exceptionIndexTable, ConstantPool constantPool)`
  Constructs an ExceptionTable.
  ``
  `Field(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Field.
  `protected`
  `FieldOrMethod(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a FieldOrMethod.
  `protected`
  `FieldOrMethod(DataInput file, ConstantPool constantPool)`
  Constructs object from file stream.
  `protected`
  `FieldOrMethod(DataInputStream file, ConstantPool constantPool)`
  Deprecated.
  (6.0) Use `FieldOrMethod(java.io.DataInput, ConstantPool)` instead.
  ``
  `InnerClasses(int nameIndex, int length, InnerClass[] innerClasses, ConstantPool constantPool)`
  Constructs an InnerClasses attribute.
  ``
  `JavaClass(int classNameIndex, int superclassNameIndex, String fileName, int major, int minor, int accessFlags, ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes)`
  Constructor gets all contents as arguments.
  ``
  `JavaClass(int classNameIndex, int superclassNameIndex, String fileName, int major, int minor, int accessFlags, ConstantPool constantPool, int[] interfaces, Field[] fields, Method[] methods, Attribute[] attributes, byte source)`
  Constructor gets all contents as arguments.
  ``
  `LineNumberTable(int nameIndex, int length, LineNumber[] lineNumberTable, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `LocalVariable(int startPc, int length, int nameIndex, int signatureIndex, int index, ConstantPool constantPool)`
  Constructs a LocalVariable.
  ``
  `LocalVariable(int startPc, int length, int nameIndex, int signatureIndex, int index, ConstantPool constantPool, int origIndex)`
  Constructs a LocalVariable.
  ``
  `LocalVariableTable(int nameIndex, int length, LocalVariable[] localVariableTable, ConstantPool constantPool)`
  ``
  `LocalVariableTypeTable(int nameIndex, int length, LocalVariable[] localVariableTypeTable, ConstantPool constantPool)`
  ``
  `Method(int accessFlags, int nameIndex, int signatureIndex, Attribute[] attributes, ConstantPool constantPool)`
  Constructs a Method.
  ``
  `ModuleMainClass(int nameIndex, int length, int mainClassIndex, ConstantPool constantPool)`
  ``
  `ModulePackages(int nameIndex, int length, int[] packageIndexTable, ConstantPool constantPool)`
  ``
  `NestHost(int nameIndex, int length, int hostClassIndex, ConstantPool constantPool)`
  ``
  `NestMembers(int nameIndex, int length, int[] classes, ConstantPool constantPool)`
  ``
  `ParameterAnnotations(byte parameterAnnotationType, int nameIndex, int length, ParameterAnnotationEntry[] parameterAnnotationTable, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `PMGClass(int nameIndex, int length, int pmgIndex, int pmgClassIndex, ConstantPool constantPool)`
  ``
  `Record(int nameIndex, int length, RecordComponentInfo[] classes, ConstantPool constantPool)`
  Constructs a new instance using components.
  ``
  `RecordComponentInfo(DataInput input, ConstantPool constantPool)`
  Constructs a new instance from an input stream.
  ``
  `RuntimeInvisibleAnnotations(int nameIndex, int length, DataInput input, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `RuntimeInvisibleParameterAnnotations(int nameIndex, int length, DataInput input, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `RuntimeVisibleAnnotations(int nameIndex, int length, DataInput input, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `RuntimeVisibleParameterAnnotations(int nameIndex, int length, DataInput input, ConstantPool constantPool)`
  Constructs a new instance.
  ``
  `Signature(int nameIndex, int length, int signatureIndex, ConstantPool constantPool)`
  ``
  `SimpleElementValue(int type, int index, ConstantPool cpool)`
  ``
  `SourceFile(int nameIndex, int length, int sourceFileIndex, ConstantPool constantPool)`
  ``
  `StackMap(int nameIndex, int length, StackMapEntry[] table, ConstantPool constantPool)`
  ``
  `StackMapEntry(int byteCodeOffset, int numberOfLocals, StackMapType[] typesOfLocals, int numberOfStackItems, StackMapType[] typesOfStackItems, ConstantPool constantPool)`
  Deprecated.
  Since 6.0, use `StackMapEntry(int, int, StackMapType[], StackMapType[], ConstantPool)` instead.
  ``
  `StackMapEntry(int tag, int byteCodeOffset, StackMapType[] typesOfLocals, StackMapType[] typesOfStackItems, ConstantPool constantPool)`
  Create an instance
  ``
  `StackMapType(byte type, int index, ConstantPool constantPool)`
  ``
  `Synthetic(int nameIndex, int length, byte[] bytes, ConstantPool constantPool)`
  ``
  `Unknown(int nameIndex, int length, byte[] bytes, ConstantPool constantPool)`
  Constructs a new instance for a non-standard attribute.

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

  Methods in org.apache.bcel.generic that return ConstantPool
  Modifier and Type
  Method
  Description
  `ConstantPool`
  ConstantPoolGen.`getConstantPool()`
  Gets the intermediate constant pool.
  `ConstantPool`
  ConstantPoolGen.`getFinalConstantPool()`
  Gets the constant pool with proper length.
  Methods in org.apache.bcel.generic with parameters of type ConstantPool
  Modifier and Type
  Method
  Description
  `String`
  CPInstruction.`toString(ConstantPool cp)`
  `String`
  FieldInstruction.`toString(ConstantPool cp)`
  `String`
  Instruction.`toString(ConstantPool cp)`
  Gets the mnemonic for instruction with symbolic references resolved.
  `String`
  InvokeInstruction.`toString(ConstantPool cp)`
  `String`
  INVOKEINTERFACE.`toString(ConstantPool cp)`
  `String`
  MULTIANEWARRAY.`toString(ConstantPool cp)`
  Constructors in org.apache.bcel.generic with parameters of type ConstantPool
  Modifier
  Constructor
  Description
  ``
  `ConstantPoolGen(ConstantPool cp)`
  Constructs a new instance with the given constant pool.

- ## Uses of ConstantPool in org.apache.bcel.verifier.statics

  Methods in org.apache.bcel.verifier.statics with parameters of type ConstantPool
  Modifier and Type
  Method
  Description
  `void`
  StringRepresentation.`visitConstantPool(ConstantPool obj)`