|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.qos.logback.core.util.Loader
public class Loader
Load resources (or images) from various sources.
Field Summary | |
---|---|
static java.lang.String |
IGNORE_TCL_PROPERTY_NAME
|
Constructor Summary | |
---|---|
Loader()
|
Method Summary | |
---|---|
static java.lang.ClassLoader |
getClassLoaderAsPrivileged(java.lang.Class clazz)
Returns the class loader of clazz in an access privileged section. |
static java.lang.ClassLoader |
getClassLoaderOfClass(java.lang.Class clazz)
Return the class loader which loaded the class passed as argument. |
static java.lang.ClassLoader |
getClassLoaderOfObject(java.lang.Object o)
Get the class loader of the object passed as argument. |
static java.net.URL |
getResource(java.lang.String resource,
java.lang.ClassLoader classLoader)
Search for a resource using the classloader passed as parameter. |
static java.net.URL |
getResourceBySelfClassLoader(java.lang.String resource)
Attempt to find a resource by using the classloader that loaded this class, namely Loader.class. |
static java.util.List<java.net.URL> |
getResourceOccurenceCount(java.lang.String resource,
java.lang.ClassLoader classLoader)
Compute the number of occurrences a resource can be found by a class loader. |
static java.lang.ClassLoader |
getTCL()
Get the Thread Context Loader which is a JDK 1.2 feature. |
static java.lang.Class |
loadClass(java.lang.String clazz)
If running under JDK 1.2 load the specified class using the Thread contextClassLoader if that fails try
Class.forname. |
static java.lang.Class |
loadClass(java.lang.String clazz,
Context context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String IGNORE_TCL_PROPERTY_NAME
Constructor Detail |
---|
public Loader()
Method Detail |
---|
public static java.util.List<java.net.URL> getResourceOccurenceCount(java.lang.String resource, java.lang.ClassLoader classLoader) throws java.io.IOException
resource
- classLoader
-
java.io.IOException
public static java.net.URL getResource(java.lang.String resource, java.lang.ClassLoader classLoader)
resource
- the resource name to look forclassLoader
- the classloader used for the searchpublic static java.net.URL getResourceBySelfClassLoader(java.lang.String resource)
resource
-
public static java.lang.ClassLoader getTCL()
null.
public static java.lang.Class loadClass(java.lang.String clazz, Context context) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public static java.lang.ClassLoader getClassLoaderOfObject(java.lang.Object o)
o
-
public static java.lang.ClassLoader getClassLoaderAsPrivileged(java.lang.Class clazz)
clazz
-
public static java.lang.ClassLoader getClassLoaderOfClass(java.lang.Class clazz)
clazz
-
public static java.lang.Class loadClass(java.lang.String clazz) throws java.lang.ClassNotFoundException
Thread
contextClassLoader
if that fails try
Class.forname. Under JDK 1.1 only Class.forName is used.
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |