Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package opalj

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode.

    OPAL is a Scala-based framework for the static analysis, manipulation and creation of Java bytecode. OPAL is designed with performance, scalability and adaptability in mind.

    Its main components are:

    • a library (Common) which provides generally useful data-structures and algorithms for static analyses.
    • a framework for implementing lattice based static analyses (Static Analysis Infrastructure)
    • a framework for parsing Java bytecode (Bytecode Infrastructure) that can be used to create arbitrary representations.
    • a library to create a one-to-one in-memory representation of Java bytecode (Bytecode Disassembler).
    • a library to create a representation of Java bytecode that facilitates writing simple static analyses (Bytecode Representation - org.opalj.br).
    • a scalable, easily customizable framework for the abstract interpretation of Java bytecode (Abstract Interpretation Framework - org.opalj.ai).
    • a library to extract dependencies between code elements and to facilitate checking architecture definitions.
    • a library for the lightweight manipulation and creation of Java bytecode (Bytecode Assembler).

    General Design Decisions

    Thread Safety

    Unless explicitly noted, OPAL is thread safe. I.e., the classes defined by OPAL can be considered to be thread safe unless otherwise stated. (For example, it is possible to read and process class files concurrently without explicit synchronization on the client side.)

    No null Values

    Unless explicitly noted, OPAL does not null values I.e., fields that are accessible will never contain null values and methods will never return null. If a method accepts null as a value for a parameter or returns a null value it is always explicitly documented. In general, the behavior of methods that are passed null values is undefined unless explicitly documented.

    No Typecasts for Collections

    For efficiency reasons, OPAL sometimes uses mutable data-structures internally. After construction time, these data-structures are generally represented using their generic interfaces (e.g., scala.collection.{Set,Map}). However, a downcast (e.g., to add/remove elements) is always forbidden as it would effectively prevent thread-safety.

    Assertions

    OPAL makes heavy use of Scala's Assertion Facility to facilitate writing correct code. Hence, for production builds (after thorough testing(!)) it is highly recommend to build OPAL again using -Xdisable-assertions.

    Definition Classes
    org
  • package br

    In this representation of Java bytecode references to a Java class file's constant pool and to attributes are replaced by direct references to the corresponding constant pool entries.

    In this representation of Java bytecode references to a Java class file's constant pool and to attributes are replaced by direct references to the corresponding constant pool entries. This facilitates developing analyses and fosters comprehension.

    Based on the fact that indirect references to constant pool entries are resolved and replaced by direct references this representation is called the resolved representation.

    This representation of Java bytecode is considered as OPAL's standard representation for writing Scala based analyses. This representation is engineered such that it facilitates writing analyses that use pattern matching.

    Definition Classes
    opalj
  • package analyses

    Defines commonly useful type aliases.

    Defines commonly useful type aliases.

    Definition Classes
    br
  • package cfg
    Definition Classes
    br
  • package collection
    Definition Classes
    br
  • package cp

    Implementation of classes to represent/recreate a class file's constant pool.

    Implementation of classes to represent/recreate a class file's constant pool.

    Definition Classes
    br
  • AsMethodref
  • CONSTANT_Class_info
  • CONSTANT_Double_info
  • CONSTANT_Dynamic_info
  • CONSTANT_FieldValue_info
  • CONSTANT_Fieldref_info
  • CONSTANT_Float_info
  • CONSTANT_Integer_info
  • CONSTANT_InterfaceMethodref_info
  • CONSTANT_InvokeDynamic_info
  • CONSTANT_Long_info
  • CONSTANT_MethodHandle_info
  • CONSTANT_MethodType_info
  • CONSTANT_Methodref_info
  • CONSTANT_Module_info
  • CONSTANT_NameAndType_info
  • CONSTANT_Package_info
  • CONSTANT_String_info
  • CONSTANT_Utf8_info
  • ConstantPoolException
  • Constant_Pool_Entry
  • ConstantsBuffer
  • ConstantsPool
  • ConstantsPoolLike
  • package fpcf
    Definition Classes
    br
  • package instructions

    Common instruction sequences.

    Common instruction sequences.

    Definition Classes
    br
  • package reader

    Defines convenience methods related to reading in class files.

    Defines convenience methods related to reading in class files.

    Definition Classes
    br

package cp

Implementation of classes to represent/recreate a class file's constant pool.

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. cp
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. trait AsMethodref extends Constant_Pool_Entry

    Constant pool entry that represents method refs.

    Constant pool entry that represents method refs.

    The created MethodRef is cached.

  2. type BootstrapMethodsBuffer = ArrayBuffer[BootstrapMethod]
  3. case class CONSTANT_Class_info(name_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Represents a class or an interface.

  4. case class CONSTANT_Double_info(value: ConstantDouble) extends CONSTANT_FieldValue_info with Product with Serializable

    Represents a constant double value.

  5. case class CONSTANT_Dynamic_info(bootstrapMethodAttributeIndex: Int, nameAndTypeIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Is used by the ldc/ldc_w/ldc2_w instructions 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 ldc/ldc_w/ldc2_w instructions 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).

  6. trait CONSTANT_FieldValue_info extends Constant_Pool_Entry

    Represents a constant field value.

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

  8. case class CONSTANT_Float_info(value: ConstantFloat) extends CONSTANT_FieldValue_info with Product with Serializable

    Represents a constant float value.

  9. case class CONSTANT_Integer_info(value: ConstantInteger) extends CONSTANT_FieldValue_info with Product with Serializable

    Represents a constant integer value.

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

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

  12. case class CONSTANT_Long_info(value: ConstantLong) extends CONSTANT_FieldValue_info with Product with Serializable

    Represents a constant long value.

  13. case class CONSTANT_MethodHandle_info(referenceKind: Int, referenceIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Represents a method handle.

  14. case class CONSTANT_MethodType_info(descriptorIndex: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Represents a method type.

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

  16. case class CONSTANT_Module_info(name_index: Constant_Pool_Index) extends Constant_Pool_Entry with Product with Serializable

    Represents the name of a module.

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

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

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

  20. case class CONSTANT_Utf8_info(value: String) extends Constant_Pool_Entry with Product with Serializable

    Represents a constant string value.

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

  22. type Constant_Pool = Array[Constant_Pool_Entry]
  23. trait Constant_Pool_Entry extends ConstantPoolEntry

    Represents a constant pool entry.

  24. type Constant_Pool_Index = Int
  25. 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.

  26. class ConstantsPool extends ConstantsPoolLike

    An immutable view of a created constants pool.

    An immutable view of a created constants pool. The ConstantsPool object is typically created using a ConstantsBuffer's build method.

  27. trait ConstantsPoolLike extends AnyRef

    Note

    The subclasses define in which case which exceptions may be thrown!

Value Members

  1. implicit def cpIndexToCPEntry(index: Constant_Pool_Index)(implicit cp: Constant_Pool): Constant_Pool_Entry
  2. object ConstantsBuffer

    Factory methods and helper methods to create a valid ConstantsBuffer.

Inherited from AnyRef

Inherited from Any

Ungrouped