|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.smartics.properties.spi.core.util.ClassLoaderUtils
public final class ClassLoaderUtils
Utilities dealing with class loaders.
Method Summary | |
---|---|
static String |
calcArchivePath(Class<?> type) Determines the path to the class loader root that contains the given type . |
static String |
calcFirstArchivePath(ClassLoader loader, String resource) Determines the path to the class loader root that contains the given resource . |
static de.smartics.util.lang.classpath.ClassPathContext |
createClassPathContext(ClassLoader classLoader, String resource) Creates the class path context for the given class loader and its derived context root. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String calcArchivePath(Class<?> type) throws NullPointerException
type
.
type
- the type whose class loader root is requested.
NullPointerException
- if
type
is
null
.
public static String calcFirstArchivePath(ClassLoader loader, String resource) throws NullPointerException, IllegalArgumentException
resource
. The first matching path is returned. This call does not check if there is more than one path that serves the given
resource
.
loader
- the loader to load the resource.
resource
- the resource whose class loader root is requested.
resource
.
NullPointerException
- if
loader
or
resource
is
null
.
IllegalArgumentException
- if the resource cannot be found by the given class loader.
public static de.smartics.util.lang.classpath.ClassPathContext createClassPathContext(ClassLoader classLoader, String resource)
resource
.
classLoader
- the class loader to access resources.
resource
- the resource whose class loader root is requested.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |