|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
org.jboss.modules.ConcurrentClassLoader
org.jboss.modules.ModuleClassLoader
public class ModuleClassLoader
A module classloader. Instances of this class implement the complete view of classes and resources available in a
module. Contrast with Module, which has API methods to access the exported view of classes and resources.
| Nested Class Summary | |
|---|---|
protected static class |
ModuleClassLoader.Configuration
An opaque configuration used internally to create a module class loader. |
| Field Summary |
|---|
| Fields inherited from class org.jboss.modules.ConcurrentClassLoader |
|---|
EMPTY_ENUMERATION |
| Constructor Summary | |
|---|---|
protected |
ModuleClassLoader(ModuleClassLoader.Configuration configuration)
Construct a new instance. |
| Method Summary | |
|---|---|
void |
clearAssertionStatus()
|
protected Object |
clone()
|
protected Package |
definePackage(String name,
String specTitle,
String specVersion,
String specVendor,
String implTitle,
String implVersion,
String implVendor,
URL sealBase)
|
boolean |
equals(Object obj)
|
protected void |
finalize()
|
protected Class<?> |
findClass(String className,
boolean exportsOnly,
boolean resolve)
Find a class, possibly delegating to other loader(s). |
protected String |
findLibrary(String libname)
Find a library from one of the resource loaders. |
URL |
findResource(String name,
boolean exportsOnly)
Find the resource with the given name and exported status. |
InputStream |
findResourceAsStream(String name,
boolean exportsOnly)
Finds the resource with the given name and exported status, returning the resource content as a stream. |
Enumeration<URL> |
findResources(String name,
boolean exportsOnly)
Finds the resources with the given name and exported status. |
Module |
getModule()
Get the module for this class loader. |
protected Package |
getPackage(String name)
|
protected Package[] |
getPackages()
|
protected PermissionCollection |
getPermissions(CodeSource codesource)
|
int |
hashCode()
|
protected void |
postDefine(ClassSpec classSpec,
Class<?> definedClass)
A hook which is invoked after a class is defined. |
protected void |
preDefine(ClassSpec classSpec,
String className)
A hook which is invoked before a class is defined. |
void |
setClassAssertionStatus(String className,
boolean enabled)
|
void |
setDefaultAssertionStatus(boolean enabled)
|
void |
setPackageAssertionStatus(String packageName,
boolean enabled)
|
String |
toString()
Get a string representation of this class loader. |
| Methods inherited from class org.jboss.modules.ConcurrentClassLoader |
|---|
findClass, findResource, findResources, getResource, getResourceAsStream, getResources, loadClass, loadClass, loadExportedClass, loadExportedClass |
| Methods inherited from class java.security.SecureClassLoader |
|---|
defineClass, defineClass |
| Methods inherited from class java.lang.ClassLoader |
|---|
defineClass, defineClass, defineClass, defineClass, findLoadedClass, findSystemClass, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, resolveClass, setSigners |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected ModuleClassLoader(ModuleClassLoader.Configuration configuration)
configuration - the module class loader configuration to use| Method Detail |
|---|
protected final Class<?> findClass(String className,
boolean exportsOnly,
boolean resolve)
throws ClassNotFoundException
ClassNotFoundException.
findClass in class ConcurrentClassLoaderclassName - the class nameexportsOnly - true if only exported classes should be consideredresolve - true if the class should be linked after loading
ClassNotFoundException - if the class is not found
protected void preDefine(ClassSpec classSpec,
String className)
classSpec - the class spec of the defined classclassName - the class to be defined
protected void postDefine(ClassSpec classSpec,
Class<?> definedClass)
classSpec - the class spec of the defined classdefinedClass - the class that was definedprotected final String findLibrary(String libname)
findLibrary in class ClassLoaderlibname - the library name
public final URL findResource(String name,
boolean exportsOnly)
findResource in class ConcurrentClassLoadername - the resource nameexportsOnly - true to consider only exported resources or false to consider all resources
ConcurrentClassLoader.getResource(String)
public final Enumeration<URL> findResources(String name,
boolean exportsOnly)
throws IOException
findResources in class ConcurrentClassLoadername - the resource nameexportsOnly - true to consider only exported resources or false to consider all resources
IOException - if an I/O error occursConcurrentClassLoader.getResources(String)
public final InputStream findResourceAsStream(String name,
boolean exportsOnly)
findResourceAsStream in class ConcurrentClassLoadername - the resource nameexportsOnly - true to consider only exported resources or false to consider all resources
null if the resource is not foundpublic final Module getModule()
public final String toString()
toString in class Objectprotected final PermissionCollection getPermissions(CodeSource codesource)
getPermissions in class SecureClassLoader
protected final Package definePackage(String name,
String specTitle,
String specVersion,
String specVendor,
String implTitle,
String implVersion,
String implVendor,
URL sealBase)
throws IllegalArgumentException
definePackage in class ClassLoaderIllegalArgumentExceptionprotected final Package getPackage(String name)
getPackage in class ClassLoaderprotected final Package[] getPackages()
getPackages in class ClassLoaderpublic final void setDefaultAssertionStatus(boolean enabled)
setDefaultAssertionStatus in class ClassLoader
public final void setPackageAssertionStatus(String packageName,
boolean enabled)
setPackageAssertionStatus in class ClassLoader
public final void setClassAssertionStatus(String className,
boolean enabled)
setClassAssertionStatus in class ClassLoaderpublic final void clearAssertionStatus()
clearAssertionStatus in class ClassLoaderpublic final int hashCode()
hashCode in class Objectpublic final boolean equals(Object obj)
equals in class Object
protected final Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
protected final void finalize()
throws Throwable
finalize in class ObjectThrowable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||