Package org.bytedeco.javacpp
Class Loader
java.lang.Object
org.bytedeco.javacpp.Loader
The Loader contains functionality to load native libraries, but also has a bit
of everything that does not fit anywhere else. In addition to its library loading
features, it also has utility methods to get the platform name, to load properties
from Java resources and from Class annotations, to extract file resources to the
temporary directory, and to get the
offsetof()
or sizeof()
a native
struct
, class
, or union
with its Pointer
peer class
and a HashMap
initialized by the native libraries inside JNI_OnLoad()
.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescription(package private) static File
User-specified cache directory set and returned bygetCacheDir()
.(package private) static boolean
Whether to extract libraries tocacheDir
, set via "org.bytedeco.javacpp.cacheLibraries" system property.(package private) static boolean
Will be set to false when symbolic link creation fails, such as on Windows.private static final ThreadLocal
<Deque<Class<?>>> The stack of classes currently being loaded to support more than one class loader.(package private) static boolean
Whether to search libraries in class, module, and library paths, set via "org.bytedeco.javacpp.findLibraries" system property.Contains all the URLs of native libraries that we found to avoid searching for them again.Contains all the native libraries that we have loaded to avoid reloading them.private static final Logger
Containsoffsetof()
andsizeof()
values of native types ofstruct
,class
, andunion
.(package private) static boolean
Default value forload(..., pathsFirst)
set via "org.bytedeco.javacpp.pathsFirst" system property.private static final String
Value created out of "java.vm.name", "os.name", and "os.arch" system properties.private static Properties
Default platform properties loaded and returned byloadProperties()
.(package private) static File
Temporary directory set and returned bygetTempDir()
.private static final boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Object
accessGlobalRef
(Pointer globalRef) static Pointer
ReturnsLoader.Helper.addressof(String)
.static File
cacheResource
(Class cls, String name) static File
cacheResource
(String name) Extracts a resource using theClassLoader
of the caller class, and returns the cachedFile
.static File
cacheResource
(URL resourceURL) ReturnscacheResource(resourceUrl, null)
static File
cacheResource
(URL resourceURL, String target) Extracts a resource, if the size or last modified timestamp differs from what is in cache, and returns the cachedFile
.static File[]
cacheResources
(Class cls, String name) Extracts resources using theClassLoader
of the specifiedClass
, and returns the cachedFile
objects.static File[]
cacheResources
(String name) Extracts resources using theClassLoader
of the caller class, and returns the cachedFile
objects.static boolean
checkPlatform
(Class<?> cls, Properties properties) static boolean
checkPlatform
(Class<?> cls, Properties properties, boolean acceptAllExtensions) static boolean
checkPlatform
(Platform platform, Properties properties) static boolean
checkPlatform
(Platform platform, Properties properties, boolean acceptAllExtensions, String... defaultNames) static boolean
checkVersion
(String groupId, String artifactId) ReturnscheckVersion(groupId, artifactId, "-", true, getCallerClass(2))
.static boolean
checkVersion
(String groupId, String artifactId, String separator, boolean logWarnings, Class cls) ReturnsgetVersion(groupId, artifactId, cls).split(separator)[n].equals(getVersion().split(separator)[0])
wheren = versions.length - (versions[versions.length - 1].equals("SNAPSHOT") ? 2 : 1)
or false on error.static void
CallsdeleteDirectory(getCacheDir())
.static String
createLibraryLink
(String filename, ClassProperties properties, String libnameversion, String... paths) Creates a version-less symbolic link to a library file, if needed.static void
deleteDirectory
(File directory) Deletes the directory and all the files in it.static void
deleteGlobalRef
(Pointer globalRef) static File
Extracts by name a resource using theClassLoader
of the specifiedClass
.static File
extractResource
(String name, File directory, String prefix, String suffix) Extracts by name a resource using theClassLoader
of the caller.static File
extractResource
(URL resourceURL, File directoryOrFile, String prefix, String suffix) ReturnsextractResource(resourceURL, directoryOrFile, prefix, suffix, false)
.static File
extractResource
(URL resourceURL, File directoryOrFile, String prefix, String suffix, boolean cacheDirectory) Extracts a resource into the specified directory and with the specified prefix and suffix for the filename.static File[]
Extracts by name resources using theClassLoader
of the specifiedClass
.static File[]
extractResources
(String name, File directory, String prefix, String suffix) Extracts by name resources using theClassLoader
of the caller.static URL[]
findLibrary
(Class cls, ClassProperties properties, String libnameversion) ReturnsfindLibrary(cls, properties, libnameversion, Loader.pathsFirst)
.static URL[]
findLibrary
(Class cls, ClassProperties properties, String libnameversion, boolean pathsFirst) Finds from where the library may be extracted and loaded among theClass
resources.static URL
findResource
(Class cls, String name) ReturnsfindResources(cls, name, 1)[0]
or null if none.static URL[]
findResources
(Class cls, String name) ReturnsfindResources(cls, name, -1)
.static URL[]
findResources
(Class cls, String name, int maxLength) Finds by name resources using theClass
and itsClassLoader
.static File
Creates and returnsSystem.getProperty("org.bytedeco.javacpp.cachedir")
or~/.javacpp/cache/
when not set.static Class
getCallerClass
(int i) Returns theClass
object that contains a caller's method.static File
getCanonicalFile
(File file) Returnsfile.getCanonicalFile()
orfile.toPath().toRealPath().toFile()
on Windows.static String
getCanonicalPath
(File file) Returnsfile.getCanonicalPath()
orfile.toPath().toRealPath().toString()
on Windows.static Class
getEnclosingClass
(Class cls) If annotated with properties, returns the argument as "enclosing Class".static Pointer
ReturnsLoader.Helper.getJavaVM()
.Returns a Map that relates each library name to the path of the loaded file.static String
ReturnsPLATFORM
.static File
Creates a unique name fortempDir
out ofSystem.getProperty("java.io.tmpdir")
andSystem.nanoTime()
.static String
ReturnsgetVersion("org.bytedeco", "javacpp")
.static String
getVersion
(String groupId, String artifactId) ReturnsgetVersion(groupId, artifactId, getCallerClass(2))
.static String
getVersion
(String groupId, String artifactId, Class cls) Returns version property fromcls.getResource("META-INF/maven/" + groupId + "/" + artifactId + "/pom.properties")
.static boolean
ReturnsSystem.getProperty("org.bytedeco.javacpp.loadlibraries")
.static String
load()
Returnsload(getCallerClass(2), loadProperties(), Loader.pathsFirst)
.static String
load
(boolean pathsFirst) Loads native libraries associated with theClass
of the caller and initializes it.static String
Returnsload(cls, loadProperties(), Loader.pathsFirst)
.static String[]
Returnsload(classes, true)
.static String[]
Callsload(Class)
on all top-level enclosing classes found in the array.static String
Returnsload(cls, loadProperties(), Loader.pathsFirst, executable)
.static String
load
(Class cls, Properties properties, boolean pathsFirst) Returnsload(cls, properties, pathsFirst, null)
.static String
load
(Class cls, Properties properties, boolean pathsFirst, String executable) Loads native libraries or executables associated with the givenClass
and initializes it.static void
loadGlobal
(String filename) static String
loadLibrary
(Class<?> cls, String libnameversion, String... preloaded) ReturnsloadLibrary(findResources(cls, libnameversion), libnameversion, preloaded)
.static String
loadLibrary
(Class<?> cls, URL[] urls, String libnameversion, String... preloaded) Tries to load the library from the URLs in order, extracting resources as necessary.static String
loadLibrary
(String libnameversion, String... preloaded) ReturnsloadLibrary(getCallerClass(2), libnameversion, preloaded)
.static String
loadLibrary
(URL[] urls, String libnameversion, String... preloaded) ReturnsloadLibrary(null, urls, libnameversion, preloaded)
.static Properties
ReturnsloadProperties(false)
.static Properties
loadProperties
(boolean forceReload) Loads theProperties
associated with the defaultgetPlatform()
.static ClassProperties
loadProperties
(Class[] cls, Properties properties, boolean inherit) For all the classes, loads all properties from each Class annotations for the given platform.static ClassProperties
loadProperties
(Class cls, Properties properties, boolean inherit) Loads all properties from Class annotations for the given platform.static Properties
loadProperties
(String name, String defaults) Loads from resources the defaultProperties
of the specified platform name.static Pointer
newGlobalRef
(Object object) ReturnsLoader.Helper.newGlobalRef(Object)
.static int
Getsoffsetof()
values frommemberOffsets
filled by native libraries.(package private) static void
putMemberOffset
(Class<? extends Pointer> type, String member, int offset) (package private) static Class
putMemberOffset
(String typeName, String member, int offset) static int
Getssizeof()
values frommemberOffsets
filled by native libraries.static int
ReturnsLoader.Helper.totalChips()
.static int
ReturnsLoader.Helper.totalCores()
.static int
ReturnsLoader.Helper.totalProcessors()
.
-
Field Details
-
logger
-
PLATFORM
Value created out of "java.vm.name", "os.name", and "os.arch" system properties. Returned bygetPlatform()
and initialized withLoader.Detector.getPlatform()
. -
WINDOWS
private static final boolean WINDOWS -
platformProperties
Default platform properties loaded and returned byloadProperties()
. -
classStack
The stack of classes currently being loaded to support more than one class loader. -
cacheDir
User-specified cache directory set and returned bygetCacheDir()
. -
tempDir
Temporary directory set and returned bygetTempDir()
. -
foundLibraries
Contains all the URLs of native libraries that we found to avoid searching for them again. -
loadedLibraries
Contains all the native libraries that we have loaded to avoid reloading them. -
canCreateSymbolicLink
static boolean canCreateSymbolicLinkWill be set to false when symbolic link creation fails, such as on Windows. Set via "org.bytedeco.javacpp.canCreateSymbolicLink" system property, defaults to false on Windows only. -
pathsFirst
static boolean pathsFirstDefault value forload(..., pathsFirst)
set via "org.bytedeco.javacpp.pathsFirst" system property. -
cacheLibraries
static boolean cacheLibrariesWhether to extract libraries tocacheDir
, set via "org.bytedeco.javacpp.cacheLibraries" system property. -
findLibraries
static boolean findLibrariesWhether to search libraries in class, module, and library paths, set via "org.bytedeco.javacpp.findLibraries" system property. -
memberOffsets
Containsoffsetof()
andsizeof()
values of native types ofstruct
,class
, andunion
. AWeakHashMap
is used to prevent the Loader from hanging onto Class objects the user may be trying to unload.
-
-
Constructor Details
-
Loader
public Loader()
-
-
Method Details
-
getPlatform
ReturnsPLATFORM
. -
getCanonicalPath
Returnsfile.getCanonicalPath()
orfile.toPath().toRealPath().toString()
on Windows.- Returns:
- The canonical pathname string denoting the same file or directory as that abstract pathname.
- Throws:
IOException
- if an I/O error occurs- See Also:
-
getCanonicalFile
Returnsfile.getCanonicalFile()
orfile.toPath().toRealPath().toFile()
on Windows.- Returns:
- The canonical file denoting the same file or directory as that abstract pathname.
- Throws:
IOException
- if an I/O error occurs- See Also:
-
loadProperties
ReturnsloadProperties(false)
. -
loadProperties
Loads theProperties
associated with the defaultgetPlatform()
.- Parameters:
forceReload
- to reset cachedplatformProperties
even when not null- Returns:
loadProperties(getPlatform(), null)
- See Also:
-
loadProperties
Loads from resources the defaultProperties
of the specified platform name. The resource must be at"org/bytedeco/javacpp/properties/" + name + ".properties"
. Also picks up system properties starting with "org.bytedeco.javacpp.platform.", which can be used to override default platform properties.- Parameters:
name
- the platform namedefaults
- the fallback platform name (null == "generic")- Returns:
- the Properties from resources
-
checkVersion
ReturnscheckVersion(groupId, artifactId, "-", true, getCallerClass(2))
. -
checkVersion
public static boolean checkVersion(String groupId, String artifactId, String separator, boolean logWarnings, Class cls) ReturnsgetVersion(groupId, artifactId, cls).split(separator)[n].equals(getVersion().split(separator)[0])
wheren = versions.length - (versions[versions.length - 1].equals("SNAPSHOT") ? 2 : 1)
or false on error. Also callsLogger.warn(String)
on error whenlogWarnings && isLoadLibraries()
. -
getVersion
ReturnsgetVersion("org.bytedeco", "javacpp")
.- Throws:
IOException
-
getVersion
ReturnsgetVersion(groupId, artifactId, getCallerClass(2))
.- Throws:
IOException
-
getVersion
Returns version property fromcls.getResource("META-INF/maven/" + groupId + "/" + artifactId + "/pom.properties")
.- Throws:
IOException
-
getEnclosingClass
If annotated with properties, returns the argument as "enclosing Class". If no properties are found on the Class, makes a search for the first Class with properties that we can use, and returns it as the enclosing Class found.- Parameters:
cls
- the Class to start the search from- Returns:
- the enclosing Class
- See Also:
-
loadProperties
For all the classes, loads all properties from each Class annotations for the given platform.- See Also:
-
loadProperties
Loads all properties from Class annotations for the given platform. The platform of interest needs to be specified as the value of the "platform" key in the properties argument. It is also possible to indicate whether to load all the classes specified in theProperties.inherit()
annotation recursively via the inherit argument.- Parameters:
cls
- the Class of which to return Propertiesproperties
- the platform Properties to inheritinherit
- indicates whether or not to inherit properties from other classes- Returns:
- all the properties associated with the Class for the given platform
-
getCallerClass
Returns theClass
object that contains a caller's method.- Parameters:
i
- the offset on the call stack of the method of interest- Returns:
- the Class found from the calling context, or
null
if not found
-
cacheResource
Extracts a resource using theClassLoader
of the caller class, and returns the cachedFile
.- Parameters:
name
- the name of the resource passed toClass.getResource(String)
- Throws:
IOException
- See Also:
-
cacheResource
- Parameters:
cls
- the Class from which to load resourcesname
- the name of the resource passed toClass.getResource(String)
- Throws:
IOException
- See Also:
-
cacheResources
Extracts resources using theClassLoader
of the caller class, and returns the cachedFile
objects.- Parameters:
name
- of the resources passed tofindResources(Class, String)
- Throws:
IOException
- See Also:
-
cacheResources
Extracts resources using theClassLoader
of the specifiedClass
, and returns the cachedFile
objects.- Parameters:
cls
- the Class from which to load resourcesname
- of the resources passed tofindResources(Class, String)
- Throws:
IOException
- See Also:
-
cacheResource
ReturnscacheResource(resourceUrl, null)
- Throws:
IOException
-
cacheResource
Extracts a resource, if the size or last modified timestamp differs from what is in cache, and returns the cachedFile
. If target is not null, creates instead a symbolic link where the resource would have been extracted. Directories from JAR files are extracted recursively.- Parameters:
resourceURL
- the URL of the resource to extract and cachetarget
- of the symbolic link to create (must be null to have the resource actually extracted)- Returns:
- the File object representing the extracted file from the cache
- Throws:
IOException
- if fails to extract resource properly- See Also:
-
extractResource
public static File extractResource(String name, File directory, String prefix, String suffix) throws IOException Extracts by name a resource using theClassLoader
of the caller.- Parameters:
name
- the name of the resource passed toClass.getResource(String)
- Throws:
IOException
- See Also:
-
extractResource
public static File extractResource(Class cls, String name, File directory, String prefix, String suffix) throws IOException Extracts by name a resource using theClassLoader
of the specifiedClass
.- Parameters:
cls
- the Class from which to load resourcesname
- the name of the resource passed toClass.getResource(String)
- Throws:
IOException
- See Also:
-
extractResources
public static File[] extractResources(String name, File directory, String prefix, String suffix) throws IOException Extracts by name resources using theClassLoader
of the caller.- Parameters:
name
- of the resources passed tofindResources(Class, String)
- Throws:
IOException
- See Also:
-
extractResources
public static File[] extractResources(Class cls, String name, File directory, String prefix, String suffix) throws IOException Extracts by name resources using theClassLoader
of the specifiedClass
.- Parameters:
cls
- the Class from which to load resourcesname
- of the resources passed tofindResources(Class, String)
- Throws:
IOException
- See Also:
-
extractResource
public static File extractResource(URL resourceURL, File directoryOrFile, String prefix, String suffix) throws IOException ReturnsextractResource(resourceURL, directoryOrFile, prefix, suffix, false)
.- Throws:
IOException
-
extractResource
public static File extractResource(URL resourceURL, File directoryOrFile, String prefix, String suffix, boolean cacheDirectory) throws IOException Extracts a resource into the specified directory and with the specified prefix and suffix for the filename. If both prefix and suffix arenull
, the original filename is used, so directoryOrFile must not benull
. Directories from JAR files are extracted recursively.- Parameters:
resourceURL
- the URL of the resource to extractdirectoryOrFile
- the output directory or file (null == System.getProperty("java.io.tmpdir")
)prefix
- the prefix of the temporary filename to usesuffix
- the suffix of the temporary filename to usecacheDirectory
- to extract files from directories only when size or last modified timestamp differs- Returns:
- the File object representing the extracted file
- Throws:
IOException
- if fails to extract resource properly
-
findResource
ReturnsfindResources(cls, name, 1)[0]
or null if none.- Throws:
IOException
-
findResources
ReturnsfindResources(cls, name, -1)
.- Throws:
IOException
-
findResources
Finds by name resources using theClass
and itsClassLoader
. Names not prefixed with '/' are considered in priority relative to the Class, but parent packages, including the default one, also get searched.- Parameters:
cls
- the Class from whose ClassLoader to load resourcesname
- of the resources passed toClass.getResource(String)
andClassLoader.getResources(String)
maxLength
- of the array to return, or -1 for no limit- Returns:
- URLs to the resources
- Throws:
IOException
-
deleteDirectory
Deletes the directory and all the files in it.- Throws:
IOException
-
clearCacheDir
CallsdeleteDirectory(getCacheDir())
.- Throws:
IOException
-
getCacheDir
Creates and returnsSystem.getProperty("org.bytedeco.javacpp.cachedir")
or~/.javacpp/cache/
when not set.- Throws:
IOException
-
getTempDir
Creates a unique name fortempDir
out ofSystem.getProperty("java.io.tmpdir")
andSystem.nanoTime()
.- Returns:
tempDir
-
getLoadedLibraries
Returns a Map that relates each library name to the path of the loaded file. -
isLoadLibraries
public static boolean isLoadLibraries()ReturnsSystem.getProperty("org.bytedeco.javacpp.loadlibraries")
. Flag set by theBuilder
to tell us not to try to load anything. -
checkPlatform
-
checkPlatform
public static boolean checkPlatform(Class<?> cls, Properties properties, boolean acceptAllExtensions) -
checkPlatform
-
checkPlatform
public static boolean checkPlatform(Platform platform, Properties properties, boolean acceptAllExtensions, String... defaultNames) -
load
Returnsload(classes, true)
. -
load
Callsload(Class)
on all top-level enclosing classes found in the array.- Parameters:
classes
- to try to loadlogMessages
- on load or fail silently- Returns:
- filenames from each successful call to
load(Class)
or null otherwise
-
load
Returnsload(getCallerClass(2), loadProperties(), Loader.pathsFirst)
. -
load
Loads native libraries associated with theClass
of the caller and initializes it.- Parameters:
pathsFirst
- search the library paths first before bundled resources- Returns:
load(getCallerClass(2), loadProperties(), pathsFirst)
- See Also:
-
load
Returnsload(cls, loadProperties(), Loader.pathsFirst)
. -
load
Returnsload(cls, loadProperties(), Loader.pathsFirst, executable)
. -
load
Returnsload(cls, properties, pathsFirst, null)
. -
load
Loads native libraries or executables associated with the givenClass
and initializes it.- Parameters:
cls
- the Class to get native library and executable information from and to initializeproperties
- the platform Properties to inheritpathsFirst
- search the library paths first before bundled resourcesexecutable
- the executable name whose path to return, or the first one found when null- Returns:
- the full path to the main file loaded, or the library name if unknown
(but
if (!isLoadLibraries() || cls == null) { return null; }
), while in the case of optional libraries or executables, it may return null when not found - Throws:
NoClassDefFoundError
- on Class initialization failureUnsatisfiedLinkError
- on native library loading failure or when interruptedIllegalArgumentException
- whenexecutable
is specified for a class without executables- See Also:
-
findLibrary
ReturnsfindLibrary(cls, properties, libnameversion, Loader.pathsFirst)
. -
findLibrary
public static URL[] findLibrary(Class cls, ClassProperties properties, String libnameversion, boolean pathsFirst) Finds from where the library may be extracted and loaded among theClass
resources. But in case that fails, and depending on the value ofpathsFirst
, either as a fallback or in priority over bundled resources, also searches the paths found in the "platform.preloadpath" and "platform.linkpath" class properties (as well as the "sun.boot.library.path" and "java.library.path" system properties ifpathsFirst || !loadLibraries
), in that order.- Parameters:
cls
- the Class whose package name andClassLoader
are used to extract from resourcesproperties
- contains the directories to scan for if we fail to extract the library from resourceslibnameversion
- the name of the library + ":" + optional exact path to library + "@" + optional version tag + "#" + a second optional name used at extraction (or empty to prevent it, unless it is a second "#") + "!" to load all symbols globallypathsFirst
- search the library paths first before bundled resources- Returns:
- URLs that point to potential locations of the library
-
loadLibrary
ReturnsloadLibrary(getCallerClass(2), libnameversion, preloaded)
. -
loadLibrary
ReturnsloadLibrary(findResources(cls, libnameversion), libnameversion, preloaded)
. -
loadLibrary
ReturnsloadLibrary(null, urls, libnameversion, preloaded)
. -
loadLibrary
public static String loadLibrary(Class<?> cls, URL[] urls, String libnameversion, String... preloaded) Tries to load the library from the URLs in order, extracting resources as necessary. Finally, if all fails, falls back onSystem.loadLibrary(String)
.- Parameters:
cls
- the Class whoseClassLoader
is used to load the library, may be nullurls
- the URLs to try loading the library fromlibnameversion
- the name of the library + ":" + optional exact path to library + "@" + optional version tag + "#" + a second optional name used at extraction (or empty to prevent it, unless it is a second "#") + "!" to load all symbols globallypreloaded
- libraries for which to create symbolic links in same cache directory- Returns:
- the full path of the file loaded, or the library name if unknown
(but
if (!isLoadLibraries) { return null; }
) - Throws:
UnsatisfiedLinkError
- on failure or when interrupted
-
createLibraryLink
public static String createLibraryLink(String filename, ClassProperties properties, String libnameversion, String... paths) Creates a version-less symbolic link to a library file, if needed. Also creates symbolic links in given paths, with and without version.- Parameters:
filename
- of the probably versioned libraryproperties
- of the class associated with the librarylibnameversion
- the library name and version as withloadLibrary(URL[], String, String...)
(can be null)paths
- where to create links, in addition to the parent directory of filename- Returns:
- the version-less filename (or null on failure), a symbolic link only if needed
-
putMemberOffset
static Class putMemberOffset(String typeName, String member, int offset) throws ClassNotFoundException Called by native libraries to putoffsetof()
andsizeof()
values inmemberOffsets
. Tries to load the Class object for typeName using theClassLoader
of the Loader.- Parameters:
typeName
- the name of the peer Class acting as interface to the native typemember
- the name of the native member variable (can be null to retrieve the Class object only)offset
- the value ofoffsetof()
(orsizeof()
whenmember.equals("sizeof")
)- Returns:
Class.forName(typeName, false)
- Throws:
ClassNotFoundException
- on Class initialization failure
-
putMemberOffset
- Parameters:
type
- the peer Class acting as interface to the native typemember
- the name of the native member variableoffset
- the value ofoffsetof()
(orsizeof()
whenmember.equals("sizeof")
)
-
offsetof
Getsoffsetof()
values frommemberOffsets
filled by native libraries.- Parameters:
type
- the peer Class acting as interface to the native typemember
- the name of the native member variable- Returns:
memberOffsets.get(type).get(member)
-
sizeof
Getssizeof()
values frommemberOffsets
filled by native libraries.- Parameters:
type
- the peer Class acting as interface to the native type- Returns:
memberOffsets.get(type).get("sizeof")
-
totalProcessors
public static int totalProcessors()ReturnsLoader.Helper.totalProcessors()
. -
totalCores
public static int totalCores()ReturnsLoader.Helper.totalCores()
. -
totalChips
public static int totalChips()ReturnsLoader.Helper.totalChips()
. -
addressof
ReturnsLoader.Helper.addressof(String)
. -
loadGlobal
-
getJavaVM
ReturnsLoader.Helper.getJavaVM()
. -
newGlobalRef
ReturnsLoader.Helper.newGlobalRef(Object)
. -
accessGlobalRef
-
deleteGlobalRef
-