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 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 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 log
    Definition Classes
    opalj
  • BasicLogMessage
  • ConsoleOPALLogger
  • DevNullLogger
  • Error
  • ExceptionLogMessage
  • Fatal
  • GlobalLogContext
  • Info
  • Level
  • LogContext
  • LogMessage
  • OPALLogger
  • StandardLogContext
  • StandardLogMessage
  • Warn
  • package util

    Utility methods.

    Utility methods.

    Definition Classes
    opalj

package log

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. case class BasicLogMessage(level: Level = Info, message: String) extends LogMessage with Product with Serializable

    Default implementation of a log message.

  2. class ConsoleOPALLogger extends OPALLogger

    The console logger is a very basic logger that ignores the context.

  3. case class ExceptionLogMessage(level: Level = Info, category: Option[String] = None, baseMessage: String, t: Throwable) extends LogMessage with Product with Serializable
  4. sealed abstract class Level extends AnyRef

    Common super trait of all log levels.

  5. trait LogContext extends AnyRef

    A log context associates log messages with a specific context and logger.

    A log context associates log messages with a specific context and logger. Using a log context facilitates the suppression of recurring message in a specific context and also makes it possible to direct messages to different targets. Before using a LogContext it has to be registered with the OPALLogger$.

    OPAL uses two primary log contexts:

    1. The GlobalLogContext$ which should be used for general log messages related to OPAL, such as the number of threads used for computations.
    2. The log context associated with org.opalj.br.analyses.Projects to log project related information (e.g., such as project related results or configuration issues.)
    Note

    The registration of the LogContext with the OPALLogger does not prevent the garbage collection of the LogContext unless a logged message explicitly references its log context. This is – however – discouraged! If no message explicitly reference the log context it is then possible to unregister the log context in the finalize method that references the context.

  6. trait LogMessage extends AnyRef

    Description of a log message.

    Description of a log message.

    Implementation Guidelines

    A LogMessage should never contain a direct reference to a LogContext object.

  7. trait OPALLogger extends AnyRef

    Facilitates the logging of messages that are relevant for the end user.

    Facilitates the logging of messages that are relevant for the end user.

    Usage

    To use OPAL's logging facility use the companion object (OPALLogger$).

    Note

    The OPALLogger framework is not intended to be used by developers to help debug analysis; it is intended to be used to inform (end)-users about the analysis progress.

  8. case class StandardLogContext extends LogContext with Product with Serializable
  9. case class StandardLogMessage(level: Level = Info, category: Option[String] = None, message: String) extends LogMessage with Product with Serializable

    Default implementation of a log message.

Value Members

  1. object DevNullLogger extends OPALLogger

    An instance of OPALLogger that does not perform _any logging_ .

    An instance of OPALLogger that does not perform _any logging_ .

    In general, it is HIGHLY recommended to use the ConsoleOPALLogger and to the set the minimium log level to Error.

  2. case object Error extends Level with Product with Serializable

    Factory for error level log messages.

    Factory for error level log messages.

    See also

    OPALLogger$ for usage instructions.

  3. case object Fatal extends Level with Product with Serializable
  4. case object GlobalLogContext extends LogContext with Product with Serializable

    The global log context which should be used to log global messages.

    The global log context which should be used to log global messages.

    This context is automatically registered with the OPALLogger framework and uses, by default, a ConsoleOPALLogger.

  5. case object Info extends Level with Product with Serializable

    Factory for info level log messages.

    Factory for info level log messages.

    See also

    OPALLogger$ for usage instructions.

  6. object LogMessage
  7. object OPALLogger extends OPALLogger

    OPAL's logging facility.

    OPAL's logging facility.

    Usage

    Basic

    E.g., using the global context and the convenience methods.

    implicit val logContext : LogContext = org.opalj.log.GlobalContext
    OPALLogger.info("project", "the project is garbage collected")

    or

    OPALLogger.info("project", "the project is garbage collected")(org.opalj.log.GlobalContext)
    Advanced

    Logging a message only once.

    implicit val logContext : LogContext = org.opalj.log.GlobalContext
    OPALLogger.logOnce(Warn("project configuration", "the method cannot be resolved"))

    Initialization

    If the GlobalLogContext should not use the default ConsoleOPALLogger then the logger can be changed using updateLogger.

    Thread Safety

    Thread safe.

  8. case object Warn extends Level with Product with Serializable

    Factory for warn level log messages.

    Factory for warn level log messages.

    See also

    OPALLogger$ for usage instructions.

Ungrouped