| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ConcurrentMap | |
| private final Runtime |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Pointer | add(Object
The java object to generate a reference for obj)Implements abstract jnr. |
| public Object | get(Pointer
a native memory pointer. reference)Implements abstract jnr. reference.
|
| private long | |
| public boolean | remove(Pointer
a native memory pointer. reference)Implements abstract jnr. |
| references | back to summary |
|---|---|
| private final ConcurrentMap<Long, DefaultObjectReferenceManager. | |
| runtime | back to summary |
|---|---|
| private final Runtime runtime | |
| DefaultObjectReferenceManager | back to summary |
|---|---|
| public DefaultObjectReferenceManager(Runtime runtime) | |
| add | back to summary |
|---|---|
| public Pointer add(Object obj) Implements abstract jnr. Doc from jnr. Adds a mapping from a java object to a unique native address. Each call to this method is guaranteed to produce a memory address unique within the ObjectReferenceManager instance, even for the same object.
A strong reference to | |
| get | back to summary |
|---|---|
| public Object get(Pointer reference) Implements abstract jnr. Doc from jnr. Gets the java object that is mapped to the native memory address referred to by | |
| id | back to summary |
|---|---|
| private long id(Object obj) | |
| remove | back to summary |
|---|---|
| public boolean remove(Pointer reference) Implements abstract jnr. Doc from jnr. Removes a mapping from java object to native pointer.
| |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. obj)Overrides java. |
| public int | |
| public long | size()
Implements abstract jnr. |
| referent | back to summary |
|---|---|
| private final Object referent | |
| ObjectReference | back to summary |
|---|---|
| public ObjectReference(Runtime runtime, long address, Object referent) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object obj) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| size | back to summary |
|---|---|
| public long size() Implements abstract jnr. Doc from jnr. Gets the size of this memory object in bytes (optional operation).
| |