Package com.jme3.system
Class NativeLibraries.LibraryInfo
java.lang.Object
com.jme3.system.NativeLibraries.LibraryInfo
- Enclosing class:
- NativeLibraries
A helper class that defines a native library by name, list of its native variants
for target platforms and a load function used to load library from an absolute
path after extracted by
NativeLibraryLoader
.-
Constructor Summary
ConstructorDescriptionLibraryInfo
(String name) Define a library by the specified name and a default load function that usesSystem.load(String)
to load extracted native from absolute path.LibraryInfo
(String name, Consumer<String> loadFunction) Define a library by the specified name and specified load function that is used to load extracted native from an absolute path string. -
Method Summary
Modifier and TypeMethodDescriptionaddNativeVariant
(Platform platform, String pathInNativesJar) Adds a new native library that targets specified platform.addNativeVariant
(Platform platform, String pathInNativesJar, String extractedAsFileName) Adds a new native library that targets specified platform.getName()
List<com.jme3.system.NativeLibrary>
-
Constructor Details
-
LibraryInfo
Define a library by the specified name and a default load function that usesSystem.load(String)
to load extracted native from absolute path.- Parameters:
name
- The library name. (not null)
-
LibraryInfo
Define a library by the specified name and specified load function that is used to load extracted native from an absolute path string.- Parameters:
name
- The library name (not null)loadFunction
- The load function for loading library from an absolute path string. (not null)
-
-
Method Details
-
getName
- Returns:
- the library name.
-
getNativeVariants
- Returns:
- the list of native variants, each targeting a specific platform.
-
addNativeVariant
Adds a new native library that targets specified platform.- Parameters:
platform
- The platform this library targetspathInNativesJar
- The path of native file inside library jar- Returns:
- this
-
addNativeVariant
public NativeLibraries.LibraryInfo addNativeVariant(Platform platform, String pathInNativesJar, String extractedAsFileName) Adds a new native library that targets specified platform.- Parameters:
platform
- The platform this library targetspathInNativesJar
- The path of native file inside library jarextractedAsFileName
- The filename that the library should be extracted as- Returns:
- this
-