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 ai

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Implementation of an abstract interpretation (ai) framework – also referred to as OPAL.

    Please note that OPAL/the abstract interpreter just refers to the classes and traits defined in this package (ai). The classes and traits defined in the sub-packages (in particular in domain) are not considered to be part of the core of OPAL/the abstract interpreter.

    Definition Classes
    opalj
    Note

    This framework assumes that the analyzed bytecode is valid; i.e., the JVM's bytecode verifier would be able to verify the code. Furthermore, load-time errors (e.g., LinkageErrors) are – by default – completely ignored to facilitate the analysis of parts of a project. In general, if the presented bytecode is not valid, the result is undefined (i.e., OPAL may report meaningless results, crash or run indefinitely).

    See also

    org.opalj.ai.AI - Implements the abstract interpreter that processes a methods code and uses an analysis-specific domain to perform the abstract computations.

    org.opalj.ai.Domain - The core interface between the abstract interpretation framework and the abstract domain that is responsible for performing the abstract computations.

  • package av
    Definition Classes
    opalj
  • package ba

    Implementation of an eDSL for creating Java bytecode.

    Implementation of an eDSL for creating Java bytecode. The eDSL is designed to facilitate the creation of correct class files; i.e., whenever possible it tries to fill wholes. For example, when an interface is specified the library automatically ensures that the super class type is (initially) set to java.lang.Object as required by the JVM specification.

    This package in particular provides functionality to convert org.opalj.br classes to org.opalj.da classes.

    Definition Classes
    opalj
  • package bc
    Definition Classes
    opalj
  • package bi

    Implementation of a library for parsing Java bytecode and creating arbitrary representations.

    Implementation of a library for parsing Java bytecode and creating arbitrary representations.

    OPAL's primary representation of Java byte code is the org.opalj.br representation which is defined in the respective package. A second representation that represents bytecode one-by-one is found in the org.opalj.da package.

    This Package

    Common constants and type definitions used across OPAL.

    Definition Classes
    opalj
  • package reader
  • ACC_ABSTRACT
  • ACC_ANNOTATION
  • ACC_BRIDGE
  • ACC_ENUM
  • ACC_FINAL
  • ACC_INTERFACE
  • ACC_MANDATED
  • ACC_MODULE
  • ACC_NATIVE
  • ACC_OPEN
  • ACC_PRIVATE
  • ACC_PROTECTED
  • ACC_PUBLIC
  • ACC_STATIC
  • ACC_STATIC_PHASE
  • ACC_STRICT
  • ACC_SUPER
  • ACC_SYNCHRONIZED
  • ACC_SYNTHETIC
  • ACC_TRANSIENT
  • ACC_TRANSITIVE
  • ACC_VARARGS
  • ACC_VOLATILE
  • AccessFlag
  • AccessFlags
  • AccessFlagsContexts
  • AccessFlagsIterator
  • AccessFlagsMatcher
  • AnnotationDefaultAttribute
  • AttributesParent
  • BootstrapMethodsAttribute
  • CodeAttribute
  • ConstantPoolTags
  • ConstantValueAttribute
  • DeprecatedAttribute
  • EnclosingMethodAttribute
  • ExceptionsAttribute
  • InnerClassesAttribute
  • LineNumberTableAttribute
  • LocalVariableTableAttribute
  • LocalVariableTypeTableAttribute
  • MethodParametersAttribute
  • ModuleAttribute
  • ModuleMainClassAttribute
  • ModulePackagesAttribute
  • NestHostAttribute
  • NestMembersAttribute
  • PermittedSubclassesAttribute
  • PrimitiveAccessFlagsMatcher
  • REF_getField
  • REF_getStatic
  • REF_invokeInterface
  • REF_invokeSpecial
  • REF_invokeStatic
  • REF_invokeVirtual
  • REF_newInvokeSpecial
  • REF_putField
  • REF_putStatic
  • RecordAttribute
  • ReferenceKind
  • RuntimeInvisibleAnnotationsAttribute
  • RuntimeInvisibleParameterAnnotationsAttribute
  • RuntimeInvisibleTypeAnnotationsAttribute
  • RuntimeVisibleAnnotationsAttribute
  • RuntimeVisibleParameterAnnotationsAttribute
  • RuntimeVisibleTypeAnnotationsAttribute
  • SignatureAttribute
  • SourceDebugExtensionAttribute
  • SourceFileAttribute
  • StackMapTableAttribute
  • SyntheticAttribute
  • VisibilityModifier
  • 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 bytecode

    Defines functionality commonly useful when processing Java bytecode.

    Defines functionality commonly useful when processing Java bytecode.

    Definition Classes
    opalj
  • package collection

    OPAL's collection library is primarily designed with high performance in mind.

    Design Goals

    OPAL's collection library is primarily designed with high performance in mind. I.e., all methods provided by the collection library are reasonably optimized. However, providing a very large number of methods is a non-goal. Overall, OPAL's collection library provides:

    • collection classes that are manually specialized for primitive data-types.
    • collection classes that are optimized for particularly small collections of values.
    • collection classes that target special use cases such as using a collection as a workset/worklist.
    • collection classes that offer special methods that minimize the number of steps when compared to general purpose methods.

    Integration With Scala's Collection Library

    Hence, OPAL's collection library complements Scala's default collection library and is not intended to replace it. Integration with Scala's collection library is primarily provided by means of iterators (OPAL's Iterators inherit from Scala's Iterators). Furthermore the companion object of each of OPAL's collection classes generally provides factory methods that facilitate the conversion from Scala collection classes to OPAL collection classes.

    Status

    The collection library is growing. Nevertheless, the existing classes are production ready.

    Definition Classes
    opalj
  • package concurrent

    Common constants, factory methods and objects used throughout OPAL when performing concurrent computations.

    Common constants, factory methods and objects used throughout OPAL when performing concurrent computations.

    Definition Classes
    opalj
  • package constraints

    Defines helper values and methods related to modeling constraints.

    Defines helper values and methods related to modeling constraints.

    Definition Classes
    opalj
  • package control

    Defines common control abstractions.

    Defines common control abstractions.

    Definition Classes
    opalj
  • package da

    Defines convenience methods related to representing certain class file elements.

    Defines convenience methods related to representing certain class file elements.

    Definition Classes
    opalj
  • package de

    Functionality to extract dependencies between class files.

    Functionality to extract dependencies between class files.

    Definition Classes
    opalj
  • package fpcf

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations of properties ordered by a lattice.

    The fixpoint computations framework (fpcf) is a general framework to perform fixpoint computations of properties ordered by a lattice. The framework in particular supports the development of static analyses.

    In this case, the fixpoint computations/static analyses are generally operating on the code and need to be executed until the computations have reached their (implicit) fixpoint. The fixpoint framework explicitly supports resolving cyclic dependencies/computations. A prime use case of the fixpoint framework are all those analyses that may interact with the results of other analyses.

    For example, an analysis that analyzes all field write accesses to determine if we can refine a field's type (for the purpose of the analysis) can (reuse) the information about the return types of methods, which however may depend on the refined field types.

    The framework is generic enough to facilitate the implementation of anytime algorithms.

    Definition Classes
    opalj
    Note

    This framework assumes that all data-structures (e.g., dependee lists and properties) that are passed to the framework are effectively immutable! (Effectively immutable means that a data structure is never updated after it was passed to the framework.)

    ,

    The dependency relation is as follows: “A depends on B” === “A is the depender, B is the dependee”. === “B is depended on by A”

    ,

    The very core of the framework is described in: Lattice Based Modularization of Static Analyses

  • package graphs

    This package defines graph algorithms as well as factory methods to describe and compute graphs and trees.

    This package defines graph algorithms as well as factory methods to describe and compute graphs and trees.

    This package supports the following types of graphs:

    1. graphs based on explicitly connected nodes (org.opalj.graphs.Node),
    2. graphs where the relationship between the nodes are encoded externally (org.opalj.graphs.Graph).
    Definition Classes
    opalj
  • package io

    Various io-related helper methods and classes.

    Various io-related helper methods and classes.

    Definition Classes
    opalj
    Note

    The implementations of the methods rely on Java NIO(2).

  • package issues

    Defines implicit conversions to wrap some types of analyses such that they generate results of type org.opalj.br.analyses.ReportableAnalysisResult.

    Defines implicit conversions to wrap some types of analyses such that they generate results of type org.opalj.br.analyses.ReportableAnalysisResult.

    Definition Classes
    opalj
  • package log
    Definition Classes
    opalj
  • package tac

    Common definitions related to the definition and processing of three address code.

    Common definitions related to the definition and processing of three address code.

    Definition Classes
    opalj
  • package util

    Utility methods.

    Utility methods.

    Definition Classes
    opalj
  • package value

    Provides a general query interface for querying a value's properties.

    Provides a general query interface for querying a value's properties.

    Definition Classes
    opalj

package bi

Implementation of a library for parsing Java bytecode and creating arbitrary representations.

OPAL's primary representation of Java byte code is the org.opalj.br representation which is defined in the respective package. A second representation that represents bytecode one-by-one is found in the org.opalj.da package.

This Package

Common constants and type definitions used across OPAL.

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

Package Members

  1. package reader

Type Members

  1. sealed trait AccessFlag extends PrimitiveAccessFlagsMatcher

    A class, field or method declaration's access flags.

    A class, field or method declaration's access flags. An access flag (e.g., public or static) is basically just a specific bit that can be combined with other access flags to create an integer based bit vector that represents all flags defined for a class, method or field declaration. Access flags are generally context dependent and the same value means different things depending on the context.

  2. final type AccessFlagsContext = bi.AccessFlagsContexts.Value
  3. class AccessFlagsIterator extends Iterator[AccessFlag]

    Enables iterating over a class( file member)'s access flags.

    Enables iterating over a class( file member)'s access flags. I.e., given the access flags of a class file, a field or a method, it is then possible to iterate over the flags (synthetic, public, deprecated, etc.) that are set.

  4. sealed trait AccessFlagsMatcher extends AnyRef

    Matches a given access flags bit array and enables the construction of complex matchers.

  5. final type AttributeParent = bi.AttributesParent.Value
  6. final type ConstantPoolTag = bi.ConstantPoolTags.Value
  7. trait PrimitiveAccessFlagsMatcher extends AccessFlagsMatcher
  8. sealed abstract class ReferenceKind extends AnyRef

    Common super class of the reference_kinds used by the constant pool's CONSTANT_MethodHandle_info structure.

  9. sealed trait VisibilityModifier extends AccessFlag

    Common supertype of all explicit visibility modifiers/access flags.

Value Members

  1. final val ClassFileMagic: Int(-889275714)

    Every Java class file starts with "0xCAFEBABE".

  2. final val Java10MajorVersion: Int(54)
  3. final val Java10Version: UShortPair
  4. final val Java11MajorVersion: Int(55)
  5. final val Java11Version: UShortPair
  6. final val Java12MajorVersion: Int(56)
  7. final val Java12Version: UShortPair
  8. final val Java13MajorVersion: Int(57)
  9. final val Java13Version: UShortPair
  10. final val Java14MajorVersion: Int(58)
  11. final val Java14Version: UShortPair
  12. final val Java15MajorVersion: Int(59)
  13. final val Java15Version: UShortPair
  14. final val Java16MajorVersion: Int(60)
  15. final val Java16Version: UShortPair
  16. final val Java17MajorVersion: Int(61)
  17. final val Java17Version: UShortPair
  18. final val Java18MajorVersion: Int(62)
  19. final val Java18Version: UShortPair
  20. final val Java19MajorVersion: Int(63)
  21. final val Java19Version: UShortPair
  22. final val Java1MajorVersion: Int(45)
  23. final val Java1_2MajorVersion: Int(46)
  24. final val Java5MajorVersion: Int(49)
  25. final val Java5Version: UShortPair
  26. final val Java6MajorVersion: Int(50)
  27. final val Java6Version: UShortPair
  28. final val Java7MajorVersion: Int(51)
  29. final val Java7Version: UShortPair
  30. final val Java8MajorVersion: Int(52)
  31. final val Java8Version: UShortPair
  32. final val Java9MajorVersion: Int(53)
  33. final val Java9Version: UShortPair
  34. final val LatestSupportedJavaMajorVersion: Int(63)

    The latest major version supported by OPAL; this constant is adapted whenever a new version is supported.

  35. final val LatestSupportedJavaVersion: UShortPair

    The latest version supported by OPAL; this constant is adapted whenever a new version is supported.

  36. val MissingLibraryWarning: String
  37. final lazy val isCurrentJREAtLeastJava10: Boolean
  38. final lazy val isCurrentJREAtLeastJava11: Boolean
  39. final lazy val isCurrentJREAtLeastJava15: Boolean
  40. final lazy val isCurrentJREAtLeastJava16: Boolean
  41. final lazy val isCurrentJREAtLeastJava17: Boolean
  42. final lazy val isCurrentJREAtLeastJava8: Boolean

    Returns true if the current JRE is at least Java 8 or a newer version.

    Returns true if the current JRE is at least Java 8 or a newer version.

    Note

    This method makes some assumptions how the version numbers will evolve.

  43. def jdkVersion(majorVersion: Int): String

    Returns a textual representation of the Java version used to create the respective class file.

  44. final def warnMissingLibrary(implicit ctx: LogContext): Unit
  45. object ACC_ABSTRACT extends AccessFlag
  46. object ACC_ANNOTATION extends AccessFlag
  47. object ACC_BRIDGE extends AccessFlag
  48. object ACC_ENUM extends AccessFlag
  49. object ACC_FINAL extends AccessFlag
  50. object ACC_INTERFACE extends AccessFlag
  51. object ACC_MANDATED extends AccessFlag
  52. object ACC_MODULE extends AccessFlag

    Identifies a class as defining a Java 9 module.

    Identifies a class as defining a Java 9 module.

    Note

    From the specification: "If ACC_MODULE is set in ClassFile.access_flags, then no other flag in ClassFile.access_flags may be set." The name of the class has to be "/module-info".

    ,

    super_class, interfaces_count, fields_count, methods_count: zero. I.e., a module does not have a super class.

  53. object ACC_NATIVE extends AccessFlag
  54. object ACC_OPEN extends AccessFlag
  55. object ACC_PRIVATE extends VisibilityModifier
  56. object ACC_PROTECTED extends VisibilityModifier
  57. object ACC_PUBLIC extends VisibilityModifier
  58. object ACC_STATIC extends AccessFlag
  59. object ACC_STATIC_PHASE extends AccessFlag

    Note

    From the JVM 9 specification: "Indicates that this [inter-module] dependence is mandatory in the static phase, i.e., at compile time, but is optional in the dynamic phase, i.e., at run time."

    ,

    Only used in combination with Java 9 modules.

  60. object ACC_STRICT extends AccessFlag
  61. object ACC_SUPER extends AccessFlag
  62. object ACC_SYNCHRONIZED extends AccessFlag
  63. object ACC_SYNTHETIC extends AccessFlag
  64. object ACC_TRANSIENT extends AccessFlag
  65. object ACC_TRANSITIVE extends AccessFlag

    Note

    From the JVM 9 specification: "Indicates that any module which depends on the current module, implicitly declares a dependence on the module indicated by this entry."

    ,

    Only used in combination with Java 9 modules.

  66. object ACC_VARARGS extends AccessFlag
  67. object ACC_VOLATILE extends AccessFlag
  68. object AccessFlags

    Convenience methods related to access flags.

  69. object AccessFlagsContexts extends Enumeration

    Enumeration of the different contexts in which the JVM Spec.

    Enumeration of the different contexts in which the JVM Spec. uses access_flags fields and also an enumeration which access_flags are found in which context.

  70. object AccessFlagsIterator

    Factory for creating AccessFlagsIterator objects.

  71. object AccessFlagsMatcher

    Predefines several access flags matchers.

    Predefines several access flags matchers.

    Example:
    1. The predefined matchers are used in the following way:

      method match { case Method(PUBLIC_STATIC(),...) => ... }
      field match { case Field(PUBLIC_STATIC_FINAL(),...) => ... }
  72. object AnnotationDefaultAttribute

    Common properties of AnnotationDefault attributes.

  73. object AttributesParent extends Enumeration

    Enumeration of all class file structures that can have attributes.

  74. object BootstrapMethodsAttribute
  75. object CodeAttribute
  76. object ConstantPoolTags extends Enumeration

    A constant pool tag identifies the type of a specific entry in the constant pool.

  77. object ConstantValueAttribute
  78. object DeprecatedAttribute
  79. object EnclosingMethodAttribute
  80. object ExceptionsAttribute
  81. object InnerClassesAttribute
  82. object LineNumberTableAttribute
  83. object LocalVariableTableAttribute
  84. object LocalVariableTypeTableAttribute
  85. object MethodParametersAttribute
  86. object ModuleAttribute
  87. object ModuleMainClassAttribute
  88. object ModulePackagesAttribute
  89. object NestHostAttribute
  90. object NestMembersAttribute
  91. object PermittedSubclassesAttribute
  92. object PrimitiveAccessFlagsMatcher

    Extractor for the bitmask used by a PrimitiveAccessFlagsMatcher.

  93. case object REF_getField extends ReferenceKind with Product with Serializable
  94. case object REF_getStatic extends ReferenceKind with Product with Serializable
  95. case object REF_invokeInterface extends ReferenceKind with Product with Serializable
  96. case object REF_invokeSpecial extends ReferenceKind with Product with Serializable
  97. case object REF_invokeStatic extends ReferenceKind with Product with Serializable
  98. case object REF_invokeVirtual extends ReferenceKind with Product with Serializable
  99. case object REF_newInvokeSpecial extends ReferenceKind with Product with Serializable
  100. case object REF_putField extends ReferenceKind with Product with Serializable
  101. case object REF_putStatic extends ReferenceKind with Product with Serializable
  102. object RecordAttribute
  103. object ReferenceKind

    Factory for ReferenceKind objects.

  104. object RuntimeInvisibleAnnotationsAttribute

    Common properties of RuntimeInvisibleAnnotations.

  105. object RuntimeInvisibleParameterAnnotationsAttribute

    Common properties of the RuntimeInvisibleParameterAnnotations attribute.

  106. object RuntimeInvisibleTypeAnnotationsAttribute

    Common properties of RuntimeInvisibleTypeAnnotations attributes.

  107. object RuntimeVisibleAnnotationsAttribute

    Common properties of RuntimeVisibleAnnotations attributes.

  108. object RuntimeVisibleParameterAnnotationsAttribute

    Common properties of RuntimeVisibleParameterAnnotations attributes.

  109. object RuntimeVisibleTypeAnnotationsAttribute

    Common properties of RuntimeVisibleTypeAnnotations attributes.

  110. object SignatureAttribute
  111. object SourceDebugExtensionAttribute
  112. object SourceFileAttribute
  113. object StackMapTableAttribute
  114. object SyntheticAttribute
  115. object VisibilityModifier

    Defines extractor methods related to visibility modifiers.

Inherited from AnyRef

Inherited from Any

Ungrouped