|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.classloader.spi.base.BaseClassLoaderPolicy
org.jboss.classloader.spi.ClassLoaderPolicy
public abstract class ClassLoaderPolicy
ClassLoader policy.
Constructor Summary | |
---|---|
ClassLoaderPolicy()
|
Method Summary | |
---|---|
PackageInformation |
getClassPackageInformation(String className,
String packageName)
Get the package information for a class |
protected List<? extends DelegateLoader> |
getDelegates()
Get the delegate loaders for imported stuff |
DelegateLoader |
getExported()
Get the delegate loader for exported stuff |
ObjectName |
getObjectName()
Get the object name the classloader is registered in the MBeanServer with |
PackageInformation |
getPackageInformation(String packageName)
Get the package information |
String[] |
getPackageNames()
Get the exported packages |
protected ProtectionDomain |
getProtectionDomain(String className,
String path)
Get the protection domain |
abstract URL |
getResource(String path)
Get the resource |
InputStream |
getResourceAsStream(String path)
Get the resource as a stream |
abstract void |
getResources(String name,
Set<URL> urls)
Get resources |
protected boolean |
isBlackListable()
Whether to cache misses |
protected boolean |
isCacheable()
Whether to cache |
protected boolean |
isImportAll()
Whether to import all exports from other classloaders in the domain |
protected ClassLoader |
isJDKRequest(String name)
Check whether this a request from the jdk if it is return the relevant classloader |
protected void |
toLongString(StringBuilder builder)
For subclasses to add information for toLongString() |
Methods inherited from class org.jboss.classloader.spi.base.BaseClassLoaderPolicy |
---|
addTranslator, clearBlackList, getAccessControlContext, getDomainName, getName, getTranslators, removeTranslator, setTranslators, shutdownPolicy, toLongString, toString, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ClassLoaderPolicy()
Method Detail |
---|
public DelegateLoader getExported()
By default this uses getPackageNames()
to create a FilteredDelegateLoader
getExported
in class BaseClassLoaderPolicy
public String[] getPackageNames()
Provides a hint for indexing
No packages are exported by default
The returned package names can be null to indicate nothing is exported, but if an array is returned it should not include a null package element.
getPackageNames
in class BaseClassLoaderPolicy
protected List<? extends DelegateLoader> getDelegates()
There are no imports by default
NOTE: Protected access for security reasons
getDelegates
in class BaseClassLoaderPolicy
protected boolean isImportAll()
False by default
isImportAll
in class BaseClassLoaderPolicy
protected boolean isCacheable()
True by default
isCacheable
in class BaseClassLoaderPolicy
protected boolean isBlackListable()
True by default
isBlackListable
in class BaseClassLoaderPolicy
public abstract URL getResource(String path)
path
- the path
public InputStream getResourceAsStream(String path)
Uses getResource(String)
by default
path
- the path
public abstract void getResources(String name, Set<URL> urls) throws IOException
name
- the resource nameurls
- the list of urls to add to
IOException
- for any errorprotected ProtectionDomain getProtectionDomain(String className, String path)
By default there is no protection domain
NOTE: Protected access for security reasons
getProtectionDomain
in class BaseClassLoaderPolicy
className
- the class namepath
- the path
public PackageInformation getPackageInformation(String packageName)
There is no package information by default
packageName
- the package information
public PackageInformation getClassPackageInformation(String className, String packageName)
The default is to invoke getPackageInformation for the class's package
className
- name the class namepackageName
- the package information
protected ClassLoader isJDKRequest(String name)
By default this uses the and returns the system classloader if true.
isJDKRequest
in class BaseClassLoaderPolicy
name
- the class name
public ObjectName getObjectName()
BaseClassLoaderPolicy
getObjectName
in class BaseClassLoaderPolicy
protected void toLongString(StringBuilder builder)
BaseClassLoaderPolicy
toLongString
in class BaseClassLoaderPolicy
builder
- the builder
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |