public class ConfigurableClassLoader extends ClassLoader
-classpath
behavior of
java
. It supports loading from local directories and
jar files, also honoring Class-Path
manifest entries.Modifier and Type | Class and Description |
---|---|
class |
ConfigurableClassLoader.ClassDirectory |
class |
ConfigurableClassLoader.ClassSource |
class |
ConfigurableClassLoader.JarArchive |
Modifier and Type | Field and Description |
---|---|
protected Map<String,Class<?>> |
local |
protected List<ConfigurableClassLoader.ClassSource> |
sources |
Constructor and Description |
---|
ConfigurableClassLoader() |
ConfigurableClassLoader(String... classpath) |
Modifier and Type | Method and Description |
---|---|
void |
addSource(String... classpath) |
void |
addSource(String classpath) |
protected Class<?> |
findClass(String name) |
byte[] |
getClassData(String name) |
Map<String,Class<?>> |
getLocalClasses() |
protected Class<?> |
loadClass(String name,
boolean resolve) |
static void |
main(String[] args) |
Collection<ConfigurableClassLoader.ClassSource> |
sources() |
protected void |
watchClass(String name,
byte[] data) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
protected final List<ConfigurableClassLoader.ClassSource> sources
public ConfigurableClassLoader()
public ConfigurableClassLoader(String... classpath)
protected void watchClass(String name, byte[] data)
public void addSource(String... classpath)
public void addSource(String classpath)
public Collection<ConfigurableClassLoader.ClassSource> sources()
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> findClass(String name) throws ClassNotFoundException
findClass
in class ClassLoader
ClassNotFoundException
public byte[] getClassData(String name) throws ClassNotFoundException
ClassNotFoundException
see also the complete user documentation .