org.jboss.classloading.plugins
Class DelegatingDomainClassLoader

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.classloading.plugins.DelegatingDomainClassLoader
All Implemented Interfaces:
Cloneable, DomainClassLoader, org.jboss.util.JBossInterface
Direct Known Subclasses:
SystemDomainClassLoader

public class DelegatingDomainClassLoader
extends org.jboss.util.JBossObject
implements DomainClassLoader

A delegate domain classloader.

Version:
$Revision: 1.4 $
Author:
Adrian Brock

Field Summary
protected  WrappingClassLoader delegate
          The delegate classloader
protected  ClassLoadingDomain domain
          The domain
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
DelegatingDomainClassLoader(ClassLoader delegate)
          Create a new Delegating domain classloader
 
Method Summary
 ClassLoadingDomain getDomain()
          The domain of the classloader
 Package getPackage(String name)
          Get a package defined by the classloader
 Set getPackageNames()
          Get the packages defined by the classloader
 Class loadClassLocally(String name, boolean resolve)
          Load a class
 URL loadResourceLocally(String name)
          Get a resource
 void setDomain(ClassLoadingDomain domain)
          Set the domain of the classloader
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString
 

Field Detail

domain

protected ClassLoadingDomain domain
The domain


delegate

protected WrappingClassLoader delegate
The delegate classloader

Constructor Detail

DelegatingDomainClassLoader

public DelegatingDomainClassLoader(ClassLoader delegate)
Create a new Delegating domain classloader

Parameters:
delegate - the delegate classloader
Method Detail

getDomain

public ClassLoadingDomain getDomain()
Description copied from interface: DomainClassLoader
The domain of the classloader

Specified by:
getDomain in interface DomainClassLoader
Returns:
the domain

setDomain

public void setDomain(ClassLoadingDomain domain)
Description copied from interface: DomainClassLoader
Set the domain of the classloader

Specified by:
setDomain in interface DomainClassLoader

loadClassLocally

public Class loadClassLocally(String name,
                              boolean resolve)
                       throws ClassNotFoundException
Description copied from interface: DomainClassLoader
Load a class

Specified by:
loadClassLocally in interface DomainClassLoader
Parameters:
name - the class name
resolve - whether to resolve the class
Returns:
the class
Throws:
ClassNotFoundException - when there is not class

loadResourceLocally

public URL loadResourceLocally(String name)
Description copied from interface: DomainClassLoader
Get a resource

Specified by:
loadResourceLocally in interface DomainClassLoader
Parameters:
name - the resource name
Returns:
the resource or null if not found

getPackageNames

public Set getPackageNames()
Description copied from interface: DomainClassLoader
Get the packages defined by the classloader

Specified by:
getPackageNames in interface DomainClassLoader
Returns:
the packages

getPackage

public Package getPackage(String name)
Description copied from interface: DomainClassLoader
Get a package defined by the classloader

Specified by:
getPackage in interface DomainClassLoader
Parameters:
name - the name of the package
Returns:
the package

toString

public void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class org.jboss.util.JBossObject

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface
Overrides:
toShortString in class org.jboss.util.JBossObject


Copyright © 2004 JBoss Inc. All Rights Reserved.