public final class NativeRuntime extends AbstractRuntime
| Modifier and Type | Class and Description |
|---|---|
private static class |
NativeRuntime.SingletonHolder |
private static class |
NativeRuntime.TypeDelegate |
| Modifier and Type | Field and Description |
|---|---|
private Type[] |
aliases |
private NativeClosureManager |
closureManager |
private NativeMemoryManager |
mm |
| Modifier | Constructor and Description |
|---|---|
private |
NativeRuntime() |
| Modifier and Type | Method and Description |
|---|---|
private static NativeType[] |
buildNativeTypeAliases() |
private static java.util.EnumMap<NativeType,Type> |
buildTypeMap() |
boolean |
equals(java.lang.Object o) |
Type |
findType(TypeAlias type)
Looks up the runtime-specific type that corresponds to the type alias
|
NativeClosureManager |
getClosureManager()
Gets the native closure manager for this runtime
|
static NativeRuntime |
getInstance() |
int |
getLastError()
Gets the last native error code.
|
NativeMemoryManager |
getMemoryManager()
Gets the native memory manager instance for this runtime
|
private static java.lang.ClassLoader |
getParentClassLoader() |
int |
hashCode() |
boolean |
isCompatible(Runtime other)
Indicates whether this Runtime instance is compatible with another Runtime instance.
|
private static Type |
jafflType(NativeType type) |
ObjectReferenceManager |
newObjectReferenceManager()
Creates a new
ObjectReferenceManager |
void |
setLastError(int error)
Sets the native error code.
|
addressMask, addressSize, byteOrder, findType, longSizegetRuntime, getSystemRuntimeprivate final NativeMemoryManager mm
private final NativeClosureManager closureManager
private final Type[] aliases
private static java.lang.ClassLoader getParentClassLoader()
public static NativeRuntime getInstance()
private static java.util.EnumMap<NativeType,Type> buildTypeMap()
private static NativeType[] buildNativeTypeAliases()
public Type findType(TypeAlias type)
Runtimepublic final NativeMemoryManager getMemoryManager()
AbstractRuntimegetMemoryManager in class AbstractRuntimeMemoryManagerpublic NativeClosureManager getClosureManager()
RuntimegetClosureManager in class RuntimeClosureManager of the runtimepublic ObjectReferenceManager newObjectReferenceManager()
RuntimeObjectReferenceManagernewObjectReferenceManager in class RuntimeObjectReferenceManagerpublic int getLastError()
AbstractRuntimeThis returns the errno value that was set at the time of the last native function call.
getLastError in class AbstractRuntimepublic void setLastError(int error)
AbstractRuntimesetLastError in class AbstractRuntimeerror - The value to set errno to.public boolean isCompatible(Runtime other)
Runtime
This is not the same as calling Object.equals(java.lang.Object) - this method only indicates whether or not artifacts from the
runtime (e.g. memory addresses) are compatible with artifacts from this one.
This is mostly for internal use.
isCompatible in class Runtimeother - the other runtime to test for compatibilitypublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprivate static Type jafflType(NativeType type)