package cp
Implementation of classes to represent/recreate a class file's constant pool.
- Alphabetic
- By Inheritance
- cp
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
AsMethodref extends Constant_Pool_Entry
Constant pool entry that represents method refs.
Constant pool entry that represents method refs.
The created
MethodRefis cached. - type BootstrapMethodsBuffer = ArrayBuffer[BootstrapMethod]
-
case class
CONSTANT_Class_info(name_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a class or an interface.
-
case class
CONSTANT_Double_info(value: ConstantDouble) extends CONSTANT_FieldValue_info with Product with Serializable
Represents a constant double value.
-
trait
CONSTANT_FieldValue_info extends Constant_Pool_Entry
Represents a constant field value.
-
case class
CONSTANT_Fieldref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a field.
-
case class
CONSTANT_Float_info(value: ConstantFloat) extends CONSTANT_FieldValue_info with Product with Serializable
Represents a constant float value.
-
case class
CONSTANT_Integer_info(value: ConstantInteger) extends CONSTANT_FieldValue_info with Product with Serializable
Represents a constant integer value.
-
case class
CONSTANT_InterfaceMethodref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index) extends AsMethodref with Product with Serializable
Represents an interface method.
-
case class
CONSTANT_InvokeDynamic_info(bootstrapMethodAttributeIndex: Int, nameAndTypeIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Is used by the invokedynamic instruction to specify a bootstrap method, the dynamic invocation name, the argument and return types of the call, and optionally, a sequence of additional constants called static arguments to the bootstrap method.
Is used by the invokedynamic instruction to specify a bootstrap method, the dynamic invocation name, the argument and return types of the call, and optionally, a sequence of additional constants called static arguments to the bootstrap method.
- bootstrapMethodAttributeIndex
This is an index into the bootstrap table. Since the bootstrap table is a class level attribute it is only possible to resolve this reference after loading the entire class file (class level attributes are loaded last).
-
case class
CONSTANT_Long_info(value: ConstantLong) extends CONSTANT_FieldValue_info with Product with Serializable
Represents a constant long value.
-
case class
CONSTANT_MethodHandle_info(referenceKind: Int, referenceIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a method handle.
-
case class
CONSTANT_MethodType_info(descriptorIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a method type.
-
case class
CONSTANT_Methodref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index) extends AsMethodref with Product with Serializable
Represents a method.
-
case class
CONSTANT_Module_info(name_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents the name of a module.
-
case class
CONSTANT_NameAndType_info(name_index: Constant_Pool_Index, descriptor_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a field or a method without indicating which class or interface it belongs to.
-
case class
CONSTANT_Package_info(name_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable
Represents a name of a package in internal form.
-
case class
CONSTANT_String_info(string_index: Constant_Pool_Index) extends CONSTANT_FieldValue_info with Product with Serializable
Represents a constant object of the type String.
-
case class
CONSTANT_Utf8_info(value: String) extends Constant_Pool_Entry with Product with Serializable
Represents a constant string value.
-
case class
ConstantPoolException(message: String) extends Exception with Product with Serializable
Used to report that a requirement related to a constant pool entry cannot be satisfied by the constant pool.
Used to report that a requirement related to a constant pool entry cannot be satisfied by the constant pool. E.g., an index is too large.
- type Constant_Pool = Array[Constant_Pool_Entry]
-
trait
Constant_Pool_Entry extends ConstantPoolEntry
Represents a constant pool entry.
- type Constant_Pool_Index = Int
-
class
ConstantsBuffer extends ConstantsPoolLike
This class can be used to (re)build a org.opalj.br.ClassFile's constant pool.
This class can be used to (re)build a org.opalj.br.ClassFile's constant pool.
- Note
The builder will try its best to create a valid constant pool (w.r.t. the overall size and size of the indexes). Issues will be reported. Use the factory method defined by the companion object ConstantsBuffer$ to create an instance and to get information about the requirements.
-
class
ConstantsPool extends ConstantsPoolLike
An immutable view of a created constants pool.
An immutable view of a created constants pool. The
ConstantsPoolobject is typically created using a ConstantsBuffer'sbuildmethod. -
trait
ConstantsPoolLike extends AnyRef
- Note
The subclasses define in which case which exceptions may be thrown!
Value Members
- implicit def cpIndexToCPEntry(index: Constant_Pool_Index)(implicit cp: Constant_Pool): Constant_Pool_Entry
-
object
ConstantsBuffer
Factory methods and helper methods to create a valid ConstantsBuffer.