asterix.misc

Unsafe

object Unsafe

The quasi-standard way for Java code to gain access to and use functionality which, when unsupervised, would allow one to break the pointer/type safety of Java.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Unsafe
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. def arrayBaseOffset(clazz: Class[_]): Int

    Gets the offset from the start of an array object's memory to the memory used to store its initial (zeroeth) element.

    Gets the offset from the start of an array object's memory to the memory used to store its initial (zeroeth) element.

    clazz

    non-null; class in question; must be an array class

    returns

    the offset to the initial element

  7. def arrayIndexScale(clazz: Class[_ <: Array[_]]): Int

    Gets the size of each element of the given array class.

    Gets the size of each element of the given array class.

    clazz

    non-null; class in question; must be an array class

    returns

    > 0; the size of each element of the array

  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. def compareAndSwapInt(obj: AnyRef, offset: Long, expect: Int, update: Int): Boolean

    Performs a compare-and-set operation on an int field within the given object.

    Performs a compare-and-set operation on an int field within the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    expect

    expected value of the field

    update

    new value to store in the field if the contents are as expected

    returns

    true if the new value was in fact stored, false otherwise

  11. def compareAndSwapLong(obj: AnyRef, offset: Long, expect: Long, update: Long): Boolean

    Performs a compare-and-set operation on an long field within the given object.

    Performs a compare-and-set operation on an long field within the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    expect

    expected value of the field

    update

    new value to store in the field if the contents are as expected

    returns

    true if the new value was in fact stored, false otherwise

  12. def compareAndSwapObject(obj: AnyRef, offset: Long, expect: AnyRef, update: AnyRef): Boolean

    Performs a compare-and-set operation on an AnyRef field (that is, a reference field) within the given object.

    Performs a compare-and-set operation on an AnyRef field (that is, a reference field) within the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    expect

    expected value of the field

    update

    new value to store in the field if the contents are as expected

    returns

    true if the new value was in fact stored, false otherwise

  13. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def getIntVolatile(obj: AnyRef, offset: Long): Int

    Gets an Int field from the given object, using volatile semantics.

    Gets an Int field from the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    returns

    the retrieved value

  18. def getLong(obj: AnyRef, offset: Long): Long

    Gets a long field from the given object.

    Gets a long field from the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    returns

    the retrieved value

  19. def getLongVolatile(obj: AnyRef, offset: Long): Long

    Gets a Long field from the given object, using volatile semantics.

    Gets a Long field from the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    returns

    the retrieved value

  20. def getObject(obj: AnyRef, offset: Long): AnyRef

    Gets an object field from the given object.

    Gets an object field from the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    returns

    the retrieved value

  21. def getObjectVolatile(obj: AnyRef, offset: Long): AnyRef

    Gets an AnyRef field from the given object, using volatile semantics.

    Gets an AnyRef field from the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    returns

    the retrieved value

  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  25. final def notify(): Unit

    Definition Classes
    AnyRef
  26. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  27. def objectFieldOffset(field: Field): Long

    Gets the raw byte offset from the start of an object's memory to the memory used to store the indicated instance field.

    Gets the raw byte offset from the start of an object's memory to the memory used to store the indicated instance field.

    field

    non-null; the field in question, which must be an instance field

    returns

    the offset to the field

  28. def putIntVolatile(obj: AnyRef, offset: Long, update: Int): Unit

    Stores an Int field into the given object, using volatile semantics.

    Stores an Int field into the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    update

    the value to store

  29. def putLong(obj: AnyRef, offset: Long, update: Long): Unit

    Stores a long field into the given object.

    Stores a long field into the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    update

    the value to store

  30. def putLongVolatile(obj: AnyRef, offset: Long, update: Long): Unit

    Stores an Long field into the given object, using volatile semantics.

    Stores an Long field into the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    update

    the value to store

  31. def putObject(obj: AnyRef, offset: Long, update: AnyRef): Unit

    Stores a object field into the given object.

    Stores a object field into the given object.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    update

    the value to store

  32. def putObjectVolatile(obj: AnyRef, offset: Long, update: AnyRef): Unit

    Stores an AnyRef field into the given object, using volatile semantics.

    Stores an AnyRef field into the given object, using volatile semantics.

    obj

    non-null; object containing the field

    offset

    offset to the field within obj

    update

    the value to store

  33. def putOrderedInt(obj: AnyRef, offset: Long, update: Int): Unit

    Lazy set an Int field.

  34. def putOrderedLong(obj: AnyRef, offset: Long, update: Long): Unit

    Lazy set a Long field.

  35. def putOrderedObject(obj: AnyRef, offset: Long, update: AnyRef): Unit

    Lazy set an AnyRef field.

  36. def staticFieldBase(field: Field): AnyRef

    Report the location of a given static field, in conjunction with staticFieldOffset.

    Report the location of a given static field, in conjunction with staticFieldOffset.

    Fetch the base "Object", if any, with which static fields of the given class can be accessed via methods like getIntVolatile. This value may be null. This value may refer to an object which is a "cookie", not guaranteed to be a real Object, and it should not be used in any way except as argument to the get and put routines in this class.

  37. def staticFieldOffset(field: Field): Long

    Gets the raw byte offset from the start of an object's memory to the memory used to store the indicated static field.

    Gets the raw byte offset from the start of an object's memory to the memory used to store the indicated static field.

    field

    non-null; the field in question, which must be a static field

    returns

    the offset to the field

  38. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  41. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  42. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped