public class JarClassLoader extends AbstractClassLoader
Constructor and Description |
---|
JarClassLoader() |
JarClassLoader(java.lang.ClassLoader parent) |
JarClassLoader(java.util.List sources)
Loads classes from different sources
|
JarClassLoader(java.lang.Object[] sources)
Loads classes from different sources
|
Modifier and Type | Method and Description |
---|---|
void |
add(java.io.InputStream jarStream)
Deprecated.
Not anymore supported (we need URL for getResource(..) method)
|
void |
add(java.lang.Object source)
Loads local/remote source
|
void |
add(java.lang.String resourceName)
Loads local/remote resource
|
void |
add(java.net.URL url)
Loads local/remote resource
|
void |
addAll(java.util.List sources)
Add all jar/class sources
|
void |
addAll(java.lang.Object[] sources)
Add all jar/class sources
|
char |
getClassNameReplacementChar() |
java.util.Map<java.lang.String,java.lang.Class> |
getLoadedClasses()
Returns all JCL-loaded classes as an immutable Map
|
java.util.Map<java.lang.String,byte[]> |
getLoadedResources()
Returns all currently loaded classes and resources.
|
ProxyClassLoader |
getLocalLoader() |
java.util.Map<java.lang.String,java.net.URL> |
getResources()
Returns an immutable Map of all resources
|
java.util.Set<java.lang.String> |
getResourcesName()
Returns an immutable Set of all resources name
|
void |
setClassNameReplacementChar(char classNameReplacementChar) |
void |
unloadAll()
Release all loaded resources and classes.
|
void |
unloadClass(java.lang.String className)
Attempts to unload class, it only unloads the locally loaded classes by
JCL
|
addLoader, getCurrentLoader, getParentLoader, getResource, getResourceAsStream, getResources, getSystemLoader, getThreadLoader, loadClass, loadClass
public JarClassLoader(java.lang.ClassLoader parent)
public JarClassLoader()
public JarClassLoader(java.lang.Object[] sources)
sources
- public JarClassLoader(java.util.List sources)
sources
- public void addAll(java.lang.Object[] sources)
sources
- public void addAll(java.util.List sources)
sources
- public void add(java.lang.Object source)
source
- public void add(java.lang.String resourceName)
resourceName
- @Deprecated public void add(java.io.InputStream jarStream)
public void add(java.net.URL url)
url
- public void unloadAll()
public void unloadClass(java.lang.String className)
className
- public char getClassNameReplacementChar()
public void setClassNameReplacementChar(char classNameReplacementChar)
public java.util.Set<java.lang.String> getResourcesName()
public java.util.Map<java.lang.String,java.net.URL> getResources()
public java.util.Map<java.lang.String,byte[]> getLoadedResources()
public ProxyClassLoader getLocalLoader()
public java.util.Map<java.lang.String,java.lang.Class> getLoadedClasses()