| Modifier and Type | Class and Description |
|---|---|
| private static class | |
| public static interface |
| Modifier and Type | Field and Description |
|---|---|
| private static final Method | |
| public static final boolean | |
| private static final HashSet | |
| private static JNILibLoaderBase. | |
| private static final String | |
| protected static final boolean | |
| private static long | |
| private static final Object | |
| private static long |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | |
| public static boolean | Returns: true if either the 'all-in-one' native JAR or all native JARs loaded successful or were loaded already, false in case of an errorFor each given Class, load the native library JAR. classesFromJavaJars, final String Optional string marker like "-all" to identify the single 'all-in-one' JAR file
after which processing of the class array shall stop. singleJarMarker)Loads and adds a JAR file's native library to the TempJarCache. |
| private static final boolean | |
| public static final boolean | addNativeJarLibsJoglCfg(final Class<?>[] classesFromJavaJars)
Loads and adds a JAR file's native library to the TempJarCache,
calling
return JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
|
| private static boolean | addNativeJarLibsWithTempJarCache(final Class<?>[] classesFromJavaJars, final String singleJarMarker)
|
| public static void | |
| public static void | |
| public static boolean | |
| protected static synchronized boolean | Returns: true if library loaded successfulthe library to load libname, final boolean if true, errors during loading the library should be ignored ignoreError, final ClassLoader optional ClassLoader, used to locate the library cl)Loads the library specified by libname, using the |
| protected static synchronized void | loadLibrary(final String
the library to load libname, final String[] the libraries to load before loading the main library if not null preload, final boolean if true, errors during loading the preload-libraries should be ignored preloadIgnoreError, final ClassLoader optional ClassLoader, used to locate the library cl)Loads the library specified by libname, using the |
| private static void | |
| public static synchronized void |
| customLoadLibraryMethod | back to summary |
|---|---|
| private static final Method customLoadLibraryMethod | |
| DEBUG | back to summary |
|---|---|
| public static final boolean DEBUG | |
| loaded | back to summary |
|---|---|
| private static final HashSet<String> loaded | |
| loaderAction | back to summary |
|---|---|
| private static JNILibLoaderBase. | |
| nativeJarTagPackage | back to summary |
|---|---|
| private static final String nativeJarTagPackage | |
| PERF | back to summary |
|---|---|
| protected static final boolean PERF | |
| perfCount | back to summary |
|---|---|
| private static long perfCount | |
| perfSync | back to summary |
|---|---|
| private static final Object perfSync | |
| perfTotal | back to summary |
|---|---|
| private static long perfTotal | |
| JNILibLoaderBase | back to summary |
|---|---|
| public JNILibLoaderBase() | |
| addLoaded | back to summary |
|---|---|
| public static void addLoaded(final String libName) | |
| addNativeJarLibs | back to summary |
|---|---|
| public static boolean addNativeJarLibs(final Class<?>[] classesFromJavaJars, final String singleJarMarker) Loads and adds a JAR file's native library to the TempJarCache.
Generic description:
final Class>[] classesFromJavaJars = new Class>[] { Class1.class, Class2.class };
JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
If Class1.class is contained in a JAR file which name includes singleJarMarker, here -all,
implementation will attempt to resolve the native JAR file as follows:
Examples: JOCL:
// only: jocl.jar -> jocl-natives-os.and.arch.jar
addNativeJarLibs(new Class>[] { JOCLJNILibLoader.class }, null, null );
JOGL:
final ClassLoader cl = GLProfile.class.getClassLoader();
// jogl-all.jar -> jogl-all-natives-os.and.arch.jar
// jogl-all-noawt.jar -> jogl-all-noawt-natives-os.and.arch.jar
// jogl-all-mobile.jar -> jogl-all-mobile-natives-os.and.arch.jar
// jogl-all-android.jar -> jogl-all-android-natives-os.and.arch.jar
// nativewindow.jar -> nativewindow-natives-os.and.arch.jar
// jogl.jar -> jogl-natives-os.and.arch.jar
// newt.jar -> newt-natives-os.and.arch.jar (if available)
final String newtFactoryClassName = "com.jogamp.newt.NewtFactory";
final Class>[] classesFromJavaJars = new Class>[] { NWJNILibLoader.class, GLProfile.class, null };
if( ReflectionUtil.isClassAvailable(newtFactoryClassName, cl) ) {
classesFromJavaJars[2] = ReflectionUtil.getClass(newtFactoryClassName, false, cl);
}
JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
| |
| addNativeJarLibsImpl | back to summary |
|---|---|
| private static final boolean addNativeJarLibsImpl(final Class<?> classFromJavaJar, final Uri classJarUri, final Uri. | |
| addNativeJarLibsJoglCfg | back to summary |
|---|---|
| public static final boolean addNativeJarLibsJoglCfg(final Class<?>[] classesFromJavaJars) Loads and adds a JAR file's native library to the TempJarCache,
calling
return JNILibLoaderBase.addNativeJarLibs(classesFromJavaJars, "-all");
If Class1.class is contained in a JAR file which name includes singleJarMarker -all,
implementation will attempt to resolve the native JAR file as follows:
| |
| addNativeJarLibsWithTempJarCache | back to summary |
|---|---|
| private static boolean addNativeJarLibsWithTempJarCache(final Class<?>[] classesFromJavaJars, final String singleJarMarker) | |
| disableLoading | back to summary |
|---|---|
| public static void disableLoading() | |
| enableLoading | back to summary |
|---|---|
| public static void enableLoading() | |
| isLoaded | back to summary |
|---|---|
| public static boolean isLoaded(final String libName) | |
| loadLibrary | back to summary |
|---|---|
| protected static synchronized boolean loadLibrary(final String libname, final boolean ignoreError, final ClassLoader cl) Loads the library specified by libname, using the
| |
| loadLibrary | back to summary |
|---|---|
| protected static synchronized void loadLibrary(final String libname, final String[] preload, final boolean preloadIgnoreError, final ClassLoader cl) Loads the library specified by libname, using the
| |
| loadLibraryInternal | back to summary |
|---|---|
| private static void loadLibraryInternal(final String libraryName, final ClassLoader cl) | |
| setLoadingAction | back to summary |
|---|---|
| public static synchronized void setLoadingAction(final JNILibLoaderBase. | |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | loadLibrary(final String
the library to load libname, final boolean if true, errors during loading the library should be ignored ignoreError, final ClassLoader optional ClassLoader, used to locate the library cl)Implements com. |
| public void | loadLibrary(final String
the library to load libname, final String[] the libraries to load before loading the main library if not null preload, final boolean if true, errors during loading the preload-libraries should be ignored preloadIgnoreError, final ClassLoader optional ClassLoader, used to locate the library cl)Implements com. |
| DefaultAction | back to summary |
|---|---|
| private DefaultAction() | |
| loadLibrary | back to summary |
|---|---|
| public boolean loadLibrary(final String libname, final boolean ignoreError, final ClassLoader cl) Implements com. Doc from com. Loads the library specified by libname.
| |
| loadLibrary | back to summary |
|---|---|
| public void loadLibrary(final String libname, final String[] preload, final boolean preloadIgnoreError, final ClassLoader cl) Implements com. Doc from com. Loads the library specified by libname.
| |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if library loaded successfulthe library to load libname, boolean if true, errors during loading the library should be ignored ignoreError, ClassLoader optional ClassLoader, used to locate the library cl)Loads the library specified by libname. |
| public void | loadLibrary(String
the library to load libname, String[] the libraries to load before loading the main library if not null preload, boolean if true, errors during loading the preload-libraries should be ignored preloadIgnoreError, ClassLoader optional ClassLoader, used to locate the library cl)Loads the library specified by libname. |
| loadLibrary | back to summary |
|---|---|
| public boolean loadLibrary(String libname, boolean ignoreError, ClassLoader cl) Loads the library specified by libname.
| |
| loadLibrary | back to summary |
|---|---|
| public void loadLibrary(String libname, String[] preload, boolean preloadIgnoreError, ClassLoader cl) Loads the library specified by libname.
| |