|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.classloader.spi.base.BaseClassLoaderDomain
public abstract class BaseClassLoaderDomain
BaseClassLoaderDomain.
This class hides some of the implementation details and allows package access to the protected methods.
| Constructor Summary | |
|---|---|
BaseClassLoaderDomain()
|
|
| Method Summary | |
|---|---|
protected abstract URL |
afterGetResource(String name)
Invoked after getResource is attempted to allow a postload attempt, e.g. |
protected abstract void |
afterGetResources(String name,
Set<URL> urls)
Invoked after getResources is attempted to allow a postload attempt, e.g. |
protected void |
afterRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked after adding a classloader policy |
protected void |
afterUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked after adding a classloader policy |
protected abstract URL |
beforeGetResource(String name)
Invoked before getResource is attempted to allow a preload attempt, e.g. |
protected abstract void |
beforeGetResources(String name,
Set<URL> urls)
Invoked before getResources is attempted to allow a preload attempt, e.g. |
protected void |
beforeRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked before adding a classloader policy |
protected void |
beforeUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
Invoked before adding a classloader policy |
protected void |
clearBlackList(String name)
Cleans the entry with the given name from the blackList |
protected abstract Loader |
findAfterLoader(String name)
Invoked after classloading is attempted to allow a postload attempt, e.g. |
protected abstract Loader |
findBeforeLoader(String name)
Invoked before classloading is attempted to allow a preload attempt, e.g. |
protected Loader |
findLoader(String name)
Find a loader for a class |
void |
flushCaches()
Flush the internal caches |
protected ClassLoader |
getParentClassLoader()
Get the parent classloader |
URL |
getResource(String name)
Get a resource |
void |
getResources(String name,
Set<URL> urls)
Get resources |
boolean |
hasClassLoaders()
Whether the domain has classloaders |
Class<?> |
loadClass(String name)
Load a class |
protected void |
shutdownDomain()
Shutdown the domain |
String |
toLongString()
A long version of toString() |
protected void |
toLongString(StringBuilder builder)
For subclasses to add information for toLongString() |
protected byte[] |
transform(ClassLoader classLoader,
String className,
byte[] byteCode,
ProtectionDomain protectionDomain)
Transform the byte code |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseClassLoaderDomain()
| Method Detail |
|---|
public void flushCaches()
protected void shutdownDomain()
The default implementation just unregisters all classloaders
public boolean hasClassLoaders()
protected byte[] transform(ClassLoader classLoader,
String className,
byte[] byteCode,
ProtectionDomain protectionDomain)
throws Exception
By default, this delegates to the classloader system
classLoader - the classloaderclassName - the class namebyteCode - the byte codeprotectionDomain - the protection domain
Exception - for any errorprotected Loader findLoader(String name)
name - the class resource name
protected abstract Loader findBeforeLoader(String name)
name - the class resource name
protected abstract Loader findAfterLoader(String name)
name - the class resource name
protected abstract void beforeGetResources(String name,
Set<URL> urls)
throws IOException
name - the resource nameurls - the urls to add to
IOException - for any error
protected abstract void afterGetResources(String name,
Set<URL> urls)
throws IOException
name - the resource nameurls - the urls to add to
IOException - for any errorprotected abstract URL beforeGetResource(String name)
name - the resource name
protected abstract URL afterGetResource(String name)
name - the class name
public Class<?> loadClass(String name)
Loader
loadClass in interface Loadername - the class name
public URL getResource(String name)
Loader
getResource in interface Loadername - the resource name
public void getResources(String name,
Set<URL> urls)
throws IOException
Loader
getResources in interface Loadername - the resource nameurls - the list of urls to add to
IOException - for any errorpublic String toLongString()
protected void toLongString(StringBuilder builder)
builder - the builder
protected void beforeRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
classLoader - the classloaderpolicy - the classloader policy
protected void afterRegisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
classLoader - the classloaderpolicy - the classloader policy
protected void beforeUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
classLoader - the classloaderpolicy - the classloader policy
protected void afterUnregisterClassLoader(ClassLoader classLoader,
ClassLoaderPolicy policy)
classLoader - the classloaderpolicy - the classloader policyprotected ClassLoader getParentClassLoader()
protected void clearBlackList(String name)
name - the name of the resource to clear from the blackList
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||