Modifier and Type | Field and Description |
---|---|
private static final FileUtils | FILE_UTILS
Utilities used for file operations |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public static boolean | Returns: true if the class exists, false otherwisethe classloader to look it. loader, String the name of the class to look for. className)Check if a classloader has a classname resource. |
public static String | Returns: the corresponding resource name.the name of the class to convert. className)Return the resource name of a class name. |
public static File | Returns: the file or jar with the class or null if we cannot determine the location.the class whose location is required. c)Find the directory or jar file the class has been loaded from. |
public static ClassLoader | Returns: the ClassLoader instance being used as the context classloader on the current thread. Returns null on JDK 1.1JDK1.1 compatible access to set the context class loader. |
public static File | Returns: the file with the resource source or null if we cannot determine the location.the classloader to be consulted for the source c, String the resource whose location is required. resource)Find the directory or a give resource has been loaded from. |
public static boolean | Returns: true if the get and set methods dealing with the context classloader are available.Indicates if the context class loader methods are available |
private static File | Returns: the normalized source location.the source location to be normalized. source)Normalize a source location |
public static void | setContextClassLoader(ClassLoader
the ClassLoader to be used as the context class loader
on the current thread. loader)Set the context classloader |
FILE_UTILS | back to summary |
---|---|
private static final FileUtils FILE_UTILS Utilities used for file operations |
LoaderUtils | back to summary |
---|---|
public LoaderUtils() |
classExists | back to summary |
---|---|
public static boolean classExists(ClassLoader loader, String className) Check if a classloader has a classname resource.
|
classNameToResource | back to summary |
---|---|
public static String classNameToResource(String className) Return the resource name of a class name. |
getClassSource | back to summary |
---|---|
public static File getClassSource(Class<?> c) Find the directory or jar file the class has been loaded from. |
getContextClassLoader | back to summary |
---|---|
public static ClassLoader getContextClassLoader() JDK1.1 compatible access to set the context class loader.
|
getResourceSource | back to summary |
---|---|
public static File getResourceSource(ClassLoader c, String resource) Find the directory or a give resource has been loaded from.
|
isContextLoaderAvailable | back to summary |
---|---|
public static boolean isContextLoaderAvailable() Indicates if the context class loader methods are available
|
normalizeSource | back to summary |
---|---|
private static File normalizeSource(File source) Normalize a source location |
setContextClassLoader | back to summary |
---|---|
public static void setContextClassLoader(ClassLoader loader) Set the context classloader
|