org.jikesrvm.runtime
Interface ObjectAddressRemapper


public interface ObjectAddressRemapper

Facility for remapping object addresses across virtual machine address spaces. Used by boot image writer to map local (JDK) objects into remote (boot image) addresses. Used by debugger to map local (JDK) objects into remote (debugee VM) addresses. See also Magic.setObjectAddressRemapper()


Method Summary
 Object addressAsObject(Address address)
          Map an address to an object.
 int identityHashCode(Object object)
          Identity hash code of an object
<T> T
intern(T object)
          Avoid duplicates of certain objects
<T> Address
objectAsAddress(T object)
          Map an object to an address.
 

Method Detail

objectAsAddress

<T> Address objectAsAddress(T object)
Map an object to an address.

Parameters:
object - in "local" virtual machine
Returns:
its address in a foreign virtual machine

addressAsObject

Object addressAsObject(Address address)
Map an address to an object.

Parameters:
address - value obtained from "objectAsAddress"
Returns:
corresponding object

intern

<T> T intern(T object)
Avoid duplicates of certain objects

Parameters:
object - to intern
Returns:
interned object

identityHashCode

int identityHashCode(Object object)
Identity hash code of an object

Parameters:
object - the object to generate the identity hash code for
Returns:
the identity hash code