| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final NativeMethods. | |
| private static final Map | registeredMethods
Store a link from the class to the native method holder in a weak hash map, so as long as the class remains alive, the native memory for the structures remains alive. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static final synchronized void | register(Class<T>
The java class to register the native methods for. clazz, List<NativeMethod> The list of methods to attach to the class. methods)Registers the native methods for a class. |
| public static final synchronized void | unregister(Class<T>
The class to unregister the native methods on. clazz)Removes all native method attachments for the specified class. |
| memory | back to summary |
|---|---|
| private final NativeMethods. | |
| registeredMethods | back to summary |
|---|---|
| private static final Map<Class<T>, NativeMethods> registeredMethods Store a link from the class to the native method holder in a weak hash map, so as long as the class remains alive, the native memory for the structures remains alive. This doesn't seem to be necessary on sun's jvm, but best do it to be safe. | |
| NativeMethods | back to summary |
|---|---|
| private NativeMethods(NativeMethods. | |
| register | back to summary |
|---|---|
| public static final synchronized void register(Class<T> clazz, List<NativeMethod> methods) Registers the native methods for a class.
| |
| unregister | back to summary |
|---|---|
| public static final synchronized void unregister(Class<T> clazz) Removes all native method attachments for the specified class.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private final MemoryIO |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | finalize()
Overrides java. |
| memory | back to summary |
|---|---|
| private final long memory | |
| mm | back to summary |
|---|---|
| private final MemoryIO mm | |
| ResourceHolder | back to summary |
|---|---|
| public ResourceHolder(MemoryIO mm, long memory) | |
| finalize | back to summary |
|---|---|
| protected void finalize() throws Throwable Overrides java. Doc from java. Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
A subclass overrides the
When running in a Java virtual machine in which finalization has been
disabled or removed, the garbage collector will never call
The general contract of
The
The Java programming language does not guarantee which thread will
invoke the
After the
The
Any exception thrown by the | |