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 mutable
    Definition Classes
    collection
  • ArrayMap
  • FixedSizeBitSet
  • FixedSizedHashIDMap
  • IntAppendChain
  • IntArrayStack
  • IntQueue
  • RefAccumulator
  • RefAppendChain
  • RefArrayBuffer
  • RefArrayStack

final class RefArrayBuffer[N >: Null <: AnyRef] extends AnyRef

An array based implementation of a mutable buffer. This implementation offers highly optimized, but very unsafe methods and is therefore not a general purpose data-structure. In general, this buffer should only be used to reference objects which outlive the life time of the buffer AND where the buffer is only used locally. To foster a local usage only, we do not inherit from any standard collection classes.

Self Type
RefArrayBuffer[N]
Note

This data structure is not thread safe.

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. def ++=(other: Array[N]): RefArrayBuffer.this.type

    Copies all values from the given array to this buffer in one step.

  4. def ++=(other: RefArrayBuffer[N]): RefArrayBuffer.this.type
  5. def ++=(is: Iterator[N]): RefArrayBuffer.this.type
  6. def ++=(is: Traversable[N]): RefArrayBuffer.this.type
  7. def +=(i: N): RefArrayBuffer.this.type
  8. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  9. def _UNSAFE_resetSize(): Unit

    Resets the size of the buffer, but does not clear the underlying array; hence, the array may prevent the garbage collection of the still referenced values.

    Resets the size of the buffer, but does not clear the underlying array; hence, the array may prevent the garbage collection of the still referenced values. This is generally not a problem if the array is only used locally and the referenced (dead) objects outlive the lifetime of the buffer!

  10. def _UNSAFE_toArray: Array[N]

    Returns a reference to the underlying mutable array if it is (by chance) completely full; otherwise a new array which just contains the valid entries is returned.

  11. def apply(index: Int): N
  12. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  13. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  14. def ensureAdditionalCapacity(capacity: Int): Unit
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def foreach[U](f: (N) ⇒ U): Unit
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  21. def head: N
  22. def isEmpty: Boolean
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. def iterator(from: Int = 0, until: Int = buffer.size0): RefIterator[N]

    Returns an iterator which iterates over the values in the specified range.

    Returns an iterator which iterates over the values in the specified range. The iterator will not check for updates of the underlying collection.

    from

    index of the first element that will be returned (inclusive)

    until

    index of the last element (exclusive)

    Note

    The next method will throw an IndexOutOfBoundsException when all elements are already returned.

  25. def iteratorFrom(startIndex: Int): RefIterator[N]

    Returns an iterator which iterates over the values starting with the value at the given startIndex.

    Returns an iterator which iterates over the values starting with the value at the given startIndex. The iterator will not check for updates of the underlying collection.

    startIndex

    index of the first element that will be returned (inclusive)

  26. def last: N
  27. def length: Int
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. def nonEmpty: Boolean
  30. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  31. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  32. def size: Int
  33. def slice(from: Int, until: Int = size0): RefArray[N]

    Extracts the slice of the given size.

    Extracts the slice of the given size.

    from

    the index of the first item (inclusive)

    until

    the index of the last item (exclusive)

  34. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  35. def toArray[T >: N](implicit arg0: ClassTag[T]): Array[T]
  36. def toSet[T >: N <: AnyRef]: Set[T]
  37. def toString(): String
    Definition Classes
    RefArrayBuffer → AnyRef → Any
  38. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped