|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.common.ResolveUtil
public final class ResolveUtil
Utility class to get resources like URLs or classes.
| Method Summary | |
|---|---|
static void |
addClassLoader(ClassLoader loader)
Adds a class loader to the utilities class. |
static Class<?> |
loadClass(Class<?> applicationContext,
String className)
Loads a class through a given context. |
static Class<?> |
loadClass(String className)
Loads a class through a given context. |
static void |
removeClassLoader(ClassLoader loader)
Removes the class loader from the utilities class. |
static URL |
resolve(Class<?> applicationContext,
String resourceName)
Resolves a URL from the given context. |
static URL |
resolve(String resourceName)
Resolves a URL from the given context. |
static URL |
tryResolve(Class<?> applicationContext,
String resourceName)
Resolves a URL from the given context. |
static URL |
tryResolve(String resourceName)
Resolves a URL from the given context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void addClassLoader(ClassLoader loader)
loader - The class loader. May not be null.public static void removeClassLoader(ClassLoader loader)
loader - The class loader. May not be null.
public static URL resolve(Class<?> applicationContext,
String resourceName)
Tries to load the resource in the following way:
1. try application context (if not null)
2. try additional class loaders
3. try system class loader
4. try to get the resource as a file.
applicationContext - The context.resourceName - The resource name.
public static URL resolve(String resourceName)
Tries to load the resource in the following way:
1. try additional class loaders
2. try system class loader
3. try to get the resource as a file.
resourceName - The resource name.
public static URL tryResolve(String resourceName)
Tries to load the resource in the following way:
1. try additional class loaders
2. try system class loader
3. try to get the resource as a file.
resourceName - The resource name.
public static URL tryResolve(Class<?> applicationContext,
String resourceName)
Tries to load the resource in the following way:
1. try application context (if not null)
2. try additional class loaders
3. try system class loader
4. try to get the resource as a file.
applicationContext - The context. May be null.resourceName - The resource name.
public static Class<?> loadClass(String className)
This method additionally uses the statically registered class loaders of this class.
It performs two attempts to load the class from a class loader:
1. ClassLoader from additionally registered class loader.
2. System - class loader.
className - The name of the class.
public static Class<?> loadClass(Class<?> applicationContext,
String className)
This method additionally uses the statically registered class loaders of this class.
It performs three attempts to load the class from a class loader:
1. ClassLoader from the given application context (if not null).
2. ClassLoader from additionally registered class loader.
3. System - class loader.
applicationContext - The context class. May be null.className - The name of the class.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||