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
  • package util

    Utility methods.

    Utility methods.

    Definition Classes
    opalj
  • Counting
  • GlobalPerformanceEvaluation
  • InMemoryClassLoader
  • IntStatistics
  • Milliseconds
  • Nanoseconds
  • PerformanceEvaluation
  • Return
  • Seconds

package util

Utility methods.

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

Type Members

  1. trait Counting extends Locking

    A simple class that enables the counting of something.

    A simple class that enables the counting of something.

    Examples:

    • How often is a function called during runtime?
    • How often runs the program in a specific case?

    Thread Safety

    This class is thread safe.

  2. class InMemoryClassLoader extends ClassLoader

    A simple ClassLoader that looks-up the available classes in a standard map.

  3. class IntStatistics extends Counting
  4. final class Milliseconds extends AnyVal with Serializable

    Represents a time span of n milliseconds.

  5. final class Nanoseconds extends AnyVal with Serializable

    Represents a time span of n nanoseconds.

  6. class PerformanceEvaluation extends Locking

    Measures the execution time of some code.

    Measures the execution time of some code.

    Thread Safety

    This class is thread safe.

  7. case class Return[T](t: T) extends Throwable with Product with Serializable
  8. final class Seconds extends AnyVal with Serializable

    Represents a time span of n seconds.

Value Members

  1. final val AnyToAnyThis: (Any) => Any
  2. val ScalaMajorVersion: String
  3. def asMB(bytesCount: Long): String

    Converts the specified number of bytes into the corresponding number of megabytes and returns a textual representation.

  4. def avg(ts: IterableOnce[Nanoseconds]): Nanoseconds
  5. final def gc(memoryMXBean: MemoryMXBean = ManagementFactory.getMemoryMXBean, maxGCTime: Milliseconds = new Milliseconds(333))(implicit logContext: Option[LogContext] = None): Unit

    Tries its best to run the garbage collector and to wait until all objects are also finalized.

    Tries its best to run the garbage collector and to wait until all objects are also finalized.

    Annotations
    @nowarn()
  6. final def ns2ms(nanoseconds: Long): Double

    Converts the specified number of nanoseconds into milliseconds.

  7. def renderConfig(config: Config, withComments: Boolean = true): String
  8. object GlobalPerformanceEvaluation extends PerformanceEvaluation
  9. object Milliseconds extends Serializable

    Defines factory methods and constants related to time spans in Milliseconds.

  10. object Nanoseconds extends Serializable

    Defines factory methods and constants related to time spans in Nanoseconds.

  11. object PerformanceEvaluation

    Collection of helper functions useful when evaluating the performance of some code.

    Collection of helper functions useful when evaluating the performance of some code.

    Example:
    1. Measuring the time and memory used by some piece of code:

      import org.opalj.util.PerformanceEvaluation.{memory,time}
      var store : Array[Object] = null
      implicit val logContext = Some(org.opalj.log.GlobalLogContext)
      for(i <- 1 to 5){
        memory{store = null}(l => println("empty: "+l))
        memory{
          time{
            store = Array.fill(1000000){val l : Object = List(i); l}
         }(t => println("time:"+t.toSeconds))
        }(l => println("non-empty:"+l))
      }
  12. object Seconds extends Serializable

    Common constants related to seconds.

Inherited from AnyRef

Inherited from Any

Ungrouped