Package org.jboss.modules
Class NativeLibraryResourceLoader
java.lang.Object
org.jboss.modules.AbstractResourceLoader
org.jboss.modules.NativeLibraryResourceLoader
- All Implemented Interfaces:
AutoCloseable
,ResourceLoader
- Direct Known Subclasses:
FileResourceLoader
A base class for resource loaders which can load native libraries.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class
Separate class for native platform ID which is only loaded when native libs are loaded. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Get the detected architecture name for this platform.getLibrary
(String name) Get the absolute physical filesystem path for a library with the given name.Get the base location of the resources in this loader (if any).getRoot()
Get the filesystem root of the resource loader.Methods inherited from class org.jboss.modules.AbstractResourceLoader
getClassSpec, getPackageSpec, getPackageSpec, getPaths, getResource, getRootName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.jboss.modules.ResourceLoader
close
-
Field Details
-
root
The filesystem root of the resource loader.
-
-
Constructor Details
-
NativeLibraryResourceLoader
Construct a new instance.- Parameters:
root
- the filesystem root of the resource loader
-
-
Method Details
-
getLibrary
Get the absolute physical filesystem path for a library with the given name. The resultant path should be path-separated using "/
" characters.- Specified by:
getLibrary
in interfaceResourceLoader
- Overrides:
getLibrary
in classAbstractResourceLoader
- Parameters:
name
- the name- Returns:
- the path or
null
if the library is not present
-
getLocation
Description copied from interface:ResourceLoader
Get the base location of the resources in this loader (if any). If the location is not known, or the resource loader does not support locations, or the resource loader does not support this method,null
is returned.- Returns:
- the base location of the resources in this loader, or
null
if not available
-
getRoot
Get the filesystem root of the resource loader.- Returns:
- the filesystem root of the resource loader
-
getArchName
Get the detected architecture name for this platform.- Returns:
- the architecture name
-