org.jboss.classloading.spi.dependency
Class ClassLoading

java.lang.Object
  extended by org.jboss.classloading.spi.dependency.ClassLoading

public class ClassLoading
extends Object

ClassLoading.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Ales Justin

Constructor Summary
ClassLoading()
           
 
Method Summary
 void addGlobalCapabilitiesProvider(GlobalCapabilitiesProvider provider)
          Add a global capabilities provider
 void addModule(Module module)
          Add a module
 boolean addModuleRegistry(ModuleRegistry moduleRegistry)
          Add module registry.
protected  Domain createDomain(String domainName, String parentDomainName, boolean parentFirst)
          Create a domain
static ClassLoader getClassLoaderForModule(Module module)
          Find the classloader for a module
protected  Domain getDomain(String domainName)
          Get a domain
protected  Domain getDomain(String domainName, String parentDomainName, boolean parentFirst)
          Get or create the domain
static Module getModuleForClassLoader(ClassLoader loader)
          Find the module for a classloader
 void removeGlobalCapabilitiesProvider(GlobalCapabilitiesProvider provider)
          Remove a global capabilities provider
 void removeModule(Module module)
          Remove a module
 boolean removeModuleRegistry(ModuleRegistry moduleRegistry)
          Remove module registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoading

public ClassLoading()
Method Detail

addModule

public void addModule(Module module)
Add a module

Parameters:
module - the module
Throws:
IllegalArgumentException - for a null module

removeModule

public void removeModule(Module module)
Remove a module

Parameters:
module - the module
Throws:
IllegalArgumentException - for a null module

addGlobalCapabilitiesProvider

public void addGlobalCapabilitiesProvider(GlobalCapabilitiesProvider provider)
Add a global capabilities provider

Parameters:
provider - the provider
Throws:
IllegalArgumentException - for a null provider

removeGlobalCapabilitiesProvider

public void removeGlobalCapabilitiesProvider(GlobalCapabilitiesProvider provider)
Remove a global capabilities provider

Parameters:
provider - the provider
Throws:
IllegalArgumentException - for a null provider

getDomain

protected Domain getDomain(String domainName,
                           String parentDomainName,
                           boolean parentFirst)
Get or create the domain

Parameters:
domainName - the domain name
parentDomainName - the parent domain name
parentFirst - whether to look in the parent first
Returns:
the domain
Throws:
IllegalArgumentException - for a null domain

getDomain

protected Domain getDomain(String domainName)
Get a domain

Parameters:
domainName - the domain name
Returns:
the domain or null if it doesn't exist

createDomain

protected Domain createDomain(String domainName,
                              String parentDomainName,
                              boolean parentFirst)
Create a domain

Parameters:
domainName - the domain name
parentDomainName - the parent domain name
parentFirst - whether to look in the parent first
Returns:
the domain
Throws:
IllegalArgumentException - for a null domain name

getModuleForClassLoader

public static Module getModuleForClassLoader(ClassLoader loader)
Find the module for a classloader

Parameters:
loader - the classloader
Returns:
the module or null if the classloader does not correspond to a registered module classloader
Throws:
SecurityException - if the caller doesn't have new RuntimePermision("getClassLoader")

getClassLoaderForModule

public static ClassLoader getClassLoaderForModule(Module module)
Find the classloader for a module

Parameters:
module - the module
Returns:
the classloader or null if the module does not correspond to a registered classloader module
Throws:
SecurityException - if the caller doesn't have new RuntimePermision("getClassLoader")

addModuleRegistry

public boolean addModuleRegistry(ModuleRegistry moduleRegistry)
Add module registry.

Parameters:
moduleRegistry - the module registry
Returns:
see Set#add

removeModuleRegistry

public boolean removeModuleRegistry(ModuleRegistry moduleRegistry)
Remove module registry.

Parameters:
moduleRegistry - the module registry
Returns:
see Set#remove


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.