|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.tools.ant.util.LoaderUtils
ClassLoader utility methods
Constructor Summary | |
LoaderUtils()
|
Method Summary | |
static java.io.File |
getClassSource(java.lang.Class c)
Find the directory or jar file the class has been loaded from. |
static java.lang.ClassLoader |
getContextClassLoader()
JDK1.1 compatible access to set the context class loader. |
static java.io.File |
getResourceSource(java.lang.ClassLoader c,
java.lang.String resource)
Find the directory or a give resource has been loaded from. |
static boolean |
isContextLoaderAvailable()
Indicates if the context class loader methods are available |
static void |
setContextClassLoader(java.lang.ClassLoader loader)
Set the context classloader |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LoaderUtils()
Method Detail |
public static void setContextClassLoader(java.lang.ClassLoader loader)
loader
- the ClassLoader to be used as the context class loader
on the current thread.public static java.lang.ClassLoader getContextClassLoader()
public static boolean isContextLoaderAvailable()
public static java.io.File getClassSource(java.lang.Class c)
c
- the class whose location is required.
public static java.io.File getResourceSource(java.lang.ClassLoader c, java.lang.String resource)
c
- the classloader to be consulted for the sourceresource
- the resource whose location is required.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |