AutoCloseable, ResourceLoaderNativeLibraryResourceLoaderpublic abstract class AbstractResourceLoader extends Object implements ResourceLoader
| Modifier | Constructor | Description |
|---|---|---|
protected |
AbstractResourceLoader() |
Construct a new instance.
|
| Modifier and Type | Method | Description |
|---|---|---|
ClassSpec |
getClassSpec(String fileName) |
Get the class specification for the given class name.
|
String |
getLibrary(String name) |
Get the absolute physical filesystem path for a library with the given name.
|
PackageSpec |
getPackageSpec(String name) |
Get the package specification for the given directory name.
|
protected static PackageSpec |
getPackageSpec(String name,
Manifest manifest,
URL rootUrl) |
Convenience method to get a package specification from a
Manifest. |
Collection<String> |
getPaths() |
Get the collection of resource paths.
|
Resource |
getResource(String name) |
Get a resource with the given name.
|
String |
getRootName() |
Get the name of the root represented by this resource loader.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, createSubloader, getLocationprotected AbstractResourceLoader()
protected static PackageSpec getPackageSpec(String name, Manifest manifest, URL rootUrl)
Manifest.name - the (dot-separated) package namemanifest - the Manifest instancerootUrl - the code source URLpublic String getRootName()
ResourceLoadergetRootName in interface ResourceLoaderpublic ClassSpec getClassSpec(String fileName) throws IOException
ResourceLoadernull is returned.getClassSpec in interface ResourceLoaderfileName - the fileName of the class, e.g. for the class org.jboss.modules.ResourceLoader
the fileName will be org/jboss/modules/ResourceLoader.classnull if the named class is not foundIOException - if an I/O error occurspublic PackageSpec getPackageSpec(String name) throws IOException
ResourceLoader/" separators.getPackageSpec in interface ResourceLoadername - the directory nameIOException - if an I/O error occurspublic Resource getResource(String name)
ResourceLoadernull is returned.
The resource name will always be specified using "/" separators for the directory segments.getResource in interface ResourceLoadername - the resource namenull if it is not availablepublic String getLibrary(String name)
ResourceLoader/" characters.getLibrary in interface ResourceLoadername - the namenull if the library is not presentpublic Collection<String> getPaths()
ResourceLoader/" characters to separate the path segments.getPaths in interface ResourceLoaderCopyright © 2018 JBoss by Red Hat. All rights reserved.