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 eval
    Definition Classes
    collection
  • package immutable
    Definition Classes
    collection
  • BitArraySet
  • EmptyIntArraySet
  • EmptyIntList
  • EmptyIntTrieSet
  • FilteredIntTrieSet
  • IdentityPair
  • Int2List
  • Int2ListEnd
  • Int2ListNode
  • IntArraySet
  • IntArraySet1
  • IntArraySetBuilder
  • IntArraySetN
  • IntIntPair
  • IntList
  • IntListNode
  • IntRefPair
  • IntTrieSet
  • IntTrieSet1
  • IntTrieSetBuilder
  • IntWorkSet
  • LargeLongLinkedTrieSet
  • Long2List
  • Long2List0
  • LongLinkedSet
  • LongLinkedTrieSet
  • LongLinkedTrieSet0
  • LongLinkedTrieSet1
  • LongLinkedTrieSetN4
  • LongList
  • LongList0
  • LongListNode
  • LongRefPair
  • LongTrieSet
  • LongTrieSetWithList
  • LongWorkSet
  • NonEmptyUIDSet
  • Pair
  • Ref2List
  • RefIntPair
  • UIDSet
  • UIDSet0
  • UIDSet1
  • UIDSet2
  • UIDSet3
  • UIDSetInnerNode
  • UIDSetLeaf
  • UIDTrieSet
  • UIDTrieSet0
  • UIDTrieSet1
  • UShortPair
  • package mutable
    Definition Classes
    collection

package immutable

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. Protected

Type Members

  1. sealed abstract class BitArraySet extends BitSet

    An immutable bit set for storing positive int values.

    An immutable bit set for storing positive int values.

    An array is used to store the underlying values. The empty bit set and sets where the maximum value is 64 use optimized representations.

  2. final class FilteredIntTrieSet extends IntTrieSet
  3. final case class IdentityPair[+T1 <: AnyRef, +T2 <: AnyRef](_1: T1, _2: T2) extends Product2[T1, T2] with Product with Serializable

    Encapsulates a pair of values that is intended to be used as a key in Maps.

    Encapsulates a pair of values that is intended to be used as a key in Maps. Compared to a standard pair (Tuple2), however, comparison of two IdentityPair objects is done by doing a reference-based comparison of the stored values.

    _1

    A reference value (can be null).

    _2

    A reference value (can be null).

    Example:
    1. val a = new String("fooBar")
      val b = "foo"+"Bar"
      val p1 = new IdentityPair(a,b) // #1
      val p2 = new IdentityPair(a,a) // #2
      val p3 = new IdentityPair(a,b) // #3
      p1 == p2 // => false (though (a,b) == (a,a) would be true
      p1 == p3 // => true
  4. sealed trait Int2List extends Serializable

    A growable, immutable linked list based data store for int values except Int.MinValue.

    A growable, immutable linked list based data store for int values except Int.MinValue. Though this data store is backed by a linked list, it is not a classical linked list and it does not offer (efficient) head and tail operations. However, compared to a classical linked list the memory usage is reduced by ~33% and a simple foreach is also ~17% faster, the time to create the list is comparable and iteration using an Iterator is marginally slower if at all. The basic idea is to two store 2 values in each node of the linked list to reduce the overhead incurred by the creation of the objects.

    This list does not perform any length related checks. I.e., it fails,e.g., in case of forFirstN if the size of the list is smaller than expected.

    Furthermore, all directly implemented methods use while loops for maximum efficiency and the list is also specialized for primitive int values which makes this list far more efficient when used for storing lists of int values.

  5. final case class Int2ListNode(h: Int, t: Int, rest: Int2List = Int2ListEnd) extends Int2List with Product with Serializable

    An container for a list element.

  6. sealed abstract class IntArraySet extends (Int) => Int with IntSet[IntArraySet] with IntCollectionWithStableOrdering[IntArraySet]

    A sorted set of integer values backed by an ordered array to store the values; this guarantees log2(n) lookup.

  7. case class IntArraySet1(i: Int) extends IntArraySet with Product with Serializable
  8. class IntArraySetBuilder extends Builder[Int, IntArraySet]
  9. case class IntArraySetN extends IntArraySet with Product with Serializable
  10. final case class IntIntPair(_1: Int, _2: Int) extends Product with Serializable

    An immutable pair of int values.

  11. sealed trait IntList extends Serializable

    An immutable linked list for storing int values.

    An immutable linked list for storing int values. This list does not perform any length related checks. I.e., it fails,e.g., in case of forFirstN if the size of the list is smaller than expected. Furthermore, all directly implemented methods use while loops for maximum efficiency.

    Note

    In many cases the Int2List provides better performance than this list if your problem fits the requirements of Int2Lists.

    ,

    In most cases a IntList can be used as a drop-in replacement for a standard Scala List.

  12. final case class IntListNode(head: Int, rest: IntList = EmptyIntList) extends IntList with Product with Serializable

    An container for a list element.

  13. final case class IntRefPair[+T](_1: Int, _2: T) extends Product2[Int, T] with Product with Serializable

    A simple pairing of an int value and a reference value.

    A simple pairing of an int value and a reference value.

    T

    The type of the reference value.

    _1

    The first value.

    _2

    The second value.

  14. sealed abstract class IntTrieSet extends IntSet[IntTrieSet] with IntCollectionWithStableOrdering[IntTrieSet] with IntWorkSet[IntTrieSet]

    An unordered set of integer values backed by a trie set.

    An unordered set of integer values backed by a trie set. The branching is done using the least significant bit and values are only stored in leaf nodes. This ensure that we have a stable iteration order.

  15. final case class IntTrieSet1 extends IntTrieSetL with Product with Serializable
  16. class IntTrieSetBuilder extends Builder[Int, IntTrieSet]
  17. trait IntWorkSet[T <: IntWorkSet[T]] extends AnyRef

    A set of integers which supports (reasonable) efficient headAndTail operations.

  18. sealed abstract class Long2List extends Serializable

    A growable, immutable linked list based data store for long values.

    A growable, immutable linked list based data store for long values. Though this data store is backed by a linked list, it is not a classical linked list and it does not offer (efficient) head and tail operations. However, compared to a classical linked list the memory usage is reduced significantly and a simple foreach is also faster.

    This list does not perform any length related checks. I.e., it fails,e.g., in case of forFirstN if the size of the list is smaller than expected.

    Furthermore, all directly implemented methods use while loops for maximum

  19. trait LongLinkedSet extends LongSet

    A set of long values.

  20. sealed abstract class LongLinkedTrieSet extends LongLinkedSet

    An effectively immutable trie set of long values where the elements are sorted based on the insertion order.

    An effectively immutable trie set of long values where the elements are sorted based on the insertion order.

    All traversing operations are defined based on the insertion order. The latest added elements will be iterated over first.

    The trie set is specialized for sizes up to three elements.

  21. final case class LongLinkedTrieSet1(v1: Long) extends LongLinkedTrieSet with Product with Serializable
  22. sealed trait LongList extends Serializable

    An immutable linked list for storing long values.

    An immutable linked list for storing long values. This list does not perform any length related checks. I.e., it fails,e.g., in case of forFirstN if the size of the list is smaller than expected. Furthermore, all directly implemented methods use while loops for maximum efficiency.

    Note

    In most cases a LongList can be used as a drop-in replacement for a standard Scala List.

  23. final case class LongListNode(head: Long, rest: LongList = LongList0) extends LongList with Product with Serializable

    An container for a list element.

  24. final case class LongRefPair[+T](_1: Long, _2: T) extends Product with Serializable

    A simple pairing of a long value and a reference value.

    A simple pairing of a long value and a reference value.

    T

    The type of the reference value.

    _1

    The first value.

    _2

    The second value.

  25. sealed abstract class LongTrieSet extends LongSet
  26. sealed abstract class LongTrieSetWithList extends LongLinkedSet

    An immutable set of long values which maintains an additional list to enable an access of the values in insertion order (newest first).

    An immutable set of long values which maintains an additional list to enable an access of the values in insertion order (newest first). Additionally, the list is used to provide more efficient iterate and foreach methods when compared to doing both on the underlying trie itself.

    Compared to the LongLinkedTrieSet this implementation uses less memory and is faster to create; however, the LongLinkedTrieSet offers faster contains and foreach methods than this implementation. Hence, this representation is faster to create and requires significantly less memory. However, accessing the data structure is generally slower. (Internally every node in the trie uses a lookup table to determine the successor node w.r.t. the next bits of a value; this requires an indirection which costs time.)

  27. trait LongWorkSet[T <: LongWorkSet[T]] extends AnyRef

    A set of longs which supports (reasonable) efficient headAndTail operations.

  28. sealed abstract class NonEmptyUIDSet[T <: UID] extends UIDSet[T]
  29. sealed abstract class Ref2List[+T <: AnyRef] extends Serializable

    A growable, immutable linked list based, data store for reference values except null.

    A growable, immutable linked list based, data store for reference values except null. Though this data store is backed by a linked list, it is not a classical linked list and it does not offer (efficient) head and tail operations. However, compared to a classical linked list the memory usage is reduced by ~33% and a simple foreach is also ~17% faster, the time to create the list is comparable and iteration using an Iterator is marginally slower if at all. The basic idea is to two store 2 values in each node of the linked list to reduce the overhead incurred by the creation of the objects.

    This list does not perform any length related checks. I.e., it fails,e.g., in case of forFirstN if the size of the list is smaller than expected.

    Furthermore, all directly implemented methods use while loops for maximum efficiency and the list is also specialized for primitive unsigned long values which makes this list far more efficient when used for storing lists of long values.

  30. final case class RefIntPair[+T](_1: T, _2: Int) extends Product2[T, Int] with Product with Serializable

    A simple pairing of a reference value and an int value.

    A simple pairing of a reference value and an int value.

    T

    The type of the reference value.

    _1

    The first value.

    _2

    The second value.

  31. sealed abstract class UIDSet[T <: UID] extends Set[T] with StrictOptimizedSetOps[T, Set, UIDSet[T]]

    An unordered trie-set based on the unique ids of the stored UID objects.

    An unordered trie-set based on the unique ids of the stored UID objects. I.e., equality of two sets is defined in terms of the unique ids and not in terms of structural or reference equality of the stored elements.

    Implementation

    This trie set uses the least significant bit to decide whether the search is continued in the right or left branch.

    Small sets are represented using a UIDSet0...3.

    Compared to Scala's Set implementations in particular the tail and filter methods are much faster.

  32. final case class UIDSet1[T <: UID](value: T) extends NonEmptyUIDSet[T] with Product with Serializable
  33. final class UIDSet2[T <: UID] extends NonEmptyUIDSet[T]
  34. final class UIDSet3[T <: UID] extends NonEmptyUIDSet[T]
  35. final class UIDSetInnerNode[T <: UID] extends UIDSetNodeLike[T]
  36. final class UIDSetLeaf[T <: UID] extends UIDSetNodeLike[T]
  37. sealed abstract class UIDTrieSet[T <: UID] extends AnyRef

    A set of objects of type UID.

    A set of objects of type UID. This set is defined over the ids of the objects and NOT over the objects themselves. I.e., at any given time no two different objects which have the same id, will be found in the set (provided that the ids are not changed after adding the object to this set, which is a pre-requisite.)

    Note

    Though equals and hashCode are implemented, comparing UID trie sets is still not efficient (n * log n) because the structure of the trie depends on the insertion order.

  38. final class UIDTrieSet1[T <: UID] extends UIDTrieSetLeaf[T]
  39. final class UShortPair extends AnyVal

    A representation of a pair of unsigned short values.

    A representation of a pair of unsigned short values.

    Example:
    1. scala> val p = org.opalj.collection.immutable.UShortPair(2323,332)
      p: org.opalj.collection.immutable.UShortPair = UShortPair(2323,332)

Value Members

  1. object BitArraySet
  2. case object EmptyIntArraySet extends IntArraySet with Product with Serializable
  3. case object EmptyIntList extends IntList with Product with Serializable

    An empty IntList.

  4. case object EmptyIntTrieSet extends IntTrieSetL with Product with Serializable
  5. object Int2List extends Serializable
  6. case object Int2ListEnd extends Int2List with Product with Serializable

    An empty Int2List.

  7. object IntArraySet
  8. object IntArraySetBuilder
  9. object IntList extends Serializable
  10. object IntTrieSet

    Factory to create IntTrieSets.

  11. object IntTrieSet1 extends Serializable
  12. object LargeLongLinkedTrieSet
  13. object Long2List extends Serializable
  14. case object Long2List0 extends Long2List with Product with Serializable

    An empty Long2List.

  15. object LongLinkedTrieSet
  16. case object LongLinkedTrieSet0 extends LongLinkedTrieSet with Product with Serializable
  17. object LongLinkedTrieSetN4
  18. object LongList extends Serializable
  19. case object LongList0 extends LongList with Product with Serializable

    An empty LongList.

  20. object LongTrieSet
  21. object LongTrieSetWithList
  22. object Pair
  23. object Ref2List extends Serializable
  24. object UIDSet
  25. object UIDSet0 extends UIDSet[UID]

    Represents the empty UIDSet.

  26. object UIDSet2
  27. object UIDTrieSet

    Factory methods for creating UIDTrieSets.

  28. case object UIDTrieSet0 extends UIDTrieSetLeaf[UID] with Product with Serializable
  29. object UShortPair

    Factory to create UShortPair objects.

Ungrouped