Trait

org.opalj.br.reader

CachedBytecodeReaderAndBinding

Related Doc: package reader

Permalink

trait CachedBytecodeReaderAndBinding extends DeferredInvokedynamicResolution

Defines a method to parse an array of bytes (containing Java bytecode instructions) and to return an array of org.opalj.br.instructions.Instructions.

The target array has the same size as the source array to make sure that branch offsets etc. point to the correct instruction.

This reader caches the instructions – primarily – to save memory once all class files are loaded.

Linear Supertypes
DeferredInvokedynamicResolution, CodeBinding, ConstantPoolBinding, Constant_PoolReader, Constant_PoolAbstractions, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CachedBytecodeReaderAndBinding
  2. DeferredInvokedynamicResolution
  3. CodeBinding
  4. ConstantPoolBinding
  5. Constant_PoolReader
  6. Constant_PoolAbstractions
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Type Members

  1. case class CONSTANT_Class_info(name_index: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  2. case class CONSTANT_Double_info(value: ConstantDouble) extends CONSTANT_FieldValue_info with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  3. trait CONSTANT_FieldValue_info extends Constant_Pool_Entry

    Permalink
    Definition Classes
    ConstantPoolBinding
  4. case class CONSTANT_Fieldref_info(class_index: ConstantPoolBinding.Constant_Pool_Index, name_and_type_index: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  5. case class CONSTANT_Float_info(value: ConstantFloat) extends CONSTANT_FieldValue_info with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  6. case class CONSTANT_Integer_info(value: ConstantInteger) extends CONSTANT_FieldValue_info with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  7. case class CONSTANT_InterfaceMethodref_info(class_index: ConstantPoolBinding.Constant_Pool_Index, name_and_type_index: ConstantPoolBinding.Constant_Pool_Index) extends AsMethodref with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  8. case class CONSTANT_InvokeDynamic_info(bootstrapMethodAttributeIndex: Int, nameAndTypeIndex: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink

    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).

    Definition Classes
    ConstantPoolBinding
  9. case class CONSTANT_Long_info(value: ConstantLong) extends CONSTANT_FieldValue_info with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  10. case class CONSTANT_MethodHandle_info(referenceKind: Int, referenceIndex: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  11. case class CONSTANT_MethodType_info(descriptorIndex: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  12. case class CONSTANT_Methodref_info(class_index: ConstantPoolBinding.Constant_Pool_Index, name_and_type_index: ConstantPoolBinding.Constant_Pool_Index) extends AsMethodref with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  13. case class CONSTANT_NameAndType_info(name_index: ConstantPoolBinding.Constant_Pool_Index, descriptor_index: ConstantPoolBinding.Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  14. case class CONSTANT_String_info(string_index: ConstantPoolBinding.Constant_Pool_Index) extends CONSTANT_FieldValue_info with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  15. case class CONSTANT_Utf8_info(value: String) extends Constant_Pool_Entry with Product with Serializable

    Permalink
    Definition Classes
    ConstantPoolBinding
  16. abstract type ClassFile <: br.ClassFile

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolAbstractions
  17. type Constant_Pool = Array[Constant_Pool_Entry]

    Permalink
    Definition Classes
    DeferredInvokedynamicResolution → Constant_PoolReader → Constant_PoolAbstractions
  18. trait Constant_Pool_Entry extends ConstantPoolEntry

    Permalink
    Definition Classes
    ConstantPoolBinding
  19. type Constant_Pool_Index = Int

    Permalink
    Definition Classes
    Constant_PoolAbstractions
  20. type DeferredActionsStore = Buffer[(ClassFile) ⇒ ClassFile] with Constant_Pool_Entry

    Permalink
    Definition Classes
    Constant_PoolAbstractions
  21. type Instructions = Array[Instruction]

    Permalink
    Definition Classes
    CodeBinding

Abstract Value Members

  1. abstract def cache: BytecodeInstructionsCache

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def CONSTANT_Class_info(i: Int): CONSTANT_Class_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  5. def CONSTANT_Double_info(d: Double): CONSTANT_Double_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  6. def CONSTANT_Fieldref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index): CONSTANT_Fieldref_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  7. def CONSTANT_Float_info(f: Float): CONSTANT_Float_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  8. def CONSTANT_Integer_info(i: Int): CONSTANT_Integer_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  9. def CONSTANT_InterfaceMethodref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index): CONSTANT_InterfaceMethodref_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  10. def CONSTANT_InvokeDynamic_info(bootstrap_method_attr_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index): CONSTANT_InvokeDynamic_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  11. def CONSTANT_Long_info(l: Long): CONSTANT_Long_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  12. def CONSTANT_MethodHandle_info(reference_kind: Int, reference_index: Int): CONSTANT_MethodHandle_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  13. def CONSTANT_MethodType_info(descriptor_index: Constant_Pool_Index): CONSTANT_MethodType_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  14. def CONSTANT_Methodref_info(class_index: Constant_Pool_Index, name_and_type_index: Constant_Pool_Index): CONSTANT_Methodref_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  15. def CONSTANT_NameAndType_info(name_index: Constant_Pool_Index, descriptor_index: Constant_Pool_Index): CONSTANT_NameAndType_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  16. def CONSTANT_String_info(i: Int): CONSTANT_String_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  17. def CONSTANT_Utf8_info(s: String): CONSTANT_Utf8_info

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  18. def Constant_Pool(in: DataInputStream): CachedBytecodeReaderAndBinding.Constant_Pool

    Permalink
    Definition Classes
    Constant_PoolReader
  19. val Constant_Pool_EntryManifest: ClassTag[Constant_Pool_Entry]

    Permalink
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  20. def Instructions(cp: Constant_Pool, source: Array[Byte]): Instructions

    Permalink

    Transforms an array of bytes into an array of org.opalj.br.instructions.Instructions.

  21. def applyDeferredActions(cp: CachedBytecodeReaderAndBinding.Constant_Pool, classFile: ClassFile): ClassFile

    Permalink
    Definition Classes
    Constant_PoolReader → Constant_PoolAbstractions
  22. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  23. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. implicit def cpIndexTocpEntry(index: Constant_Pool_Index)(implicit cp: CachedBytecodeReaderAndBinding.Constant_Pool): Constant_Pool_Entry

    Permalink
    Definition Classes
    ConstantPoolBinding
  25. def createDeferredActionsStore(): DeferredActionsStore

    Permalink
    Attributes
    protected[this]
    Definition Classes
    ConstantPoolBinding → Constant_PoolReader
  26. def deferredInvokedynamicResolution(classFile: ClassFile, cp: Constant_Pool, cpEntry: CONSTANT_InvokeDynamic_info, instructions: Array[Instruction], index: Int): ClassFile

    Permalink

    Resolves an invokedynamic instruction using the BootstrapMethodTable of the class.

    Resolves an invokedynamic instruction using the BootstrapMethodTable of the class.

    Deferred resolution is necessary since the BootstrapMethodTable – which is an attribute of the class file – is loaded after the methods.

    classFile

    The ClassFile with which the deferred action was registered.

    cp

    The class file's Constant_Pool.

    cpEntry

    The invokedynamic instruction's constant pool entry.

    instructions

    This method's array of instructions.Instructions. (The array returned by the #Instructions method.)

    index

    The index in the instructions array that refers to the invokedynamic instruction.

    Attributes
    protected
    Definition Classes
    DeferredInvokedynamicResolution
    Note

    This method is registered as callback method that is called (back) after the class file was completely loaded. Registration as a callback method happens whenever an invokedynamic instruction is found in a method's byte code.

    Overriding this Method

    To perform additional analysis on invokedynamic instructions, e.g. to fully resolve the call target, a subclass may override this method to do so. When you override this method, you should call this method (super.deferredResolveInvokedynamicInstruction) that the default resolution is carried out.

  27. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  28. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  29. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  30. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  31. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  32. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  33. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  34. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  36. def registerDeferredAction(cp: CachedBytecodeReaderAndBinding.Constant_Pool)(deferredAction: (ClassFile) ⇒ ClassFile): Unit

    Permalink
    Definition Classes
    Constant_PoolReader
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from CodeBinding

Inherited from ConstantPoolBinding

Inherited from Constant_PoolReader

Inherited from Constant_PoolAbstractions

Inherited from AnyRef

Inherited from Any

Ungrouped