|
||||||||||
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
org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy
public class VFSClassLoaderPolicy
VFSClassLoaderPolicy.
Constructor Summary | |
---|---|
VFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile[] roots)
Create a new VFSClassLoaderPolicy. |
|
VFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
Create a new VFSClassLoaderPolicy. |
|
VFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots)
Create a new VFSClassLoaderPolicy. |
|
VFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
Create a new VFSClassLoaderPolicy. |
Method Summary | |
---|---|
protected boolean |
checkFilters(String path,
String context)
Check the filters |
static VFSClassLoaderPolicy |
createVFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile... roots)
Create a new VFSClassLoaderPolicy. |
static VFSClassLoaderPolicy |
createVFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
Create a new VFSClassLoaderPolicy. |
static VFSClassLoaderPolicy |
createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile... roots)
Create a new VFSClassLoaderPolicy. |
static VFSClassLoaderPolicy |
createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
Create a new VFSClassLoaderPolicy. |
protected org.jboss.virtual.VirtualFile |
findChild(String path)
Find a child from a path |
protected org.jboss.virtual.VirtualFile |
findRoot(String path)
Find a root from a path |
protected org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.VirtualFileInfo |
findVirtualFileInfo(String path)
Find the virtual file information for a path |
PackageInformation |
getClassPackageInformation(String className,
String packageName)
Get the package information for a class |
List<? extends DelegateLoader> |
getDelegates()
Get the delegate loaders for imported stuff |
ClassFilter |
getExcluded()
Get the excluded. |
ClassFilter |
getExcludedExport()
Get the excludedExport. |
ExportAll |
getExportAll()
Get the exportAll. |
DelegateLoader |
getExported()
Get the delegate loader for exported stuff |
String[] |
getExportedPackages()
Get the exported packages |
ClassFilter |
getIncluded()
Get the included. |
String |
getName()
Get a simple name for the classloader |
String[] |
getPackageNames()
Get the exported packages |
protected ProtectionDomain |
getProtectionDomain(String className,
String path)
Get the protection domain |
URL |
getResource(String path)
Get the resource |
InputStream |
getResourceAsStream(String path)
Get the resource as a stream |
void |
getResources(String name,
Set<URL> urls)
Get resources |
boolean |
isBlackListable()
Whether to cache misses |
boolean |
isCacheable()
Whether to cache |
boolean |
isImportAll()
Whether to import all exports from other classloaders in the domain |
boolean |
isUseRealURL()
Do we use real url. |
void |
setBlackListable(boolean blackListable)
Set the blackListable. |
void |
setCacheable(boolean cacheable)
Set the cacheable. |
void |
setDelegates(List<? extends DelegateLoader> delegates)
Set the delegates. |
void |
setExcluded(ClassFilter excluded)
Set the excluded. |
void |
setExcludedExport(ClassFilter excludedExport)
Set the excludedExport. |
void |
setExportAll(ExportAll exportAll)
Set the exportAll. |
void |
setExportedPackages(String[] exportedPackages)
Set the exportedPackages. |
void |
setImportAll(boolean importAll)
Set the importAll. |
void |
setIncluded(ClassFilter included)
Set the included. |
void |
setUseRealURL(boolean useRealURL)
Set use real url flag. |
protected void |
toLongString(StringBuilder builder)
For subclasses to add information for toLongString() |
Methods inherited from class org.jboss.classloader.spi.ClassLoaderPolicy |
---|
getObjectName, getPackageInformation, isJDKRequest |
Methods inherited from class org.jboss.classloader.spi.base.BaseClassLoaderPolicy |
---|
addTranslator, clearBlackList, getAccessControlContext, getDomainName, 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 VFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots)
roots
- the roots
IllegalArgumentException
- for null rootspublic VFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots, org.jboss.virtual.VirtualFile[] excludedRoots)
roots
- the rootsexcludedRoots
- the excluded roots
IllegalArgumentException
- for null rootspublic VFSClassLoaderPolicy(String name, org.jboss.virtual.VirtualFile[] roots)
name
- the nameroots
- the roots
IllegalArgumentException
- for null rootspublic VFSClassLoaderPolicy(String name, org.jboss.virtual.VirtualFile[] roots, org.jboss.virtual.VirtualFile[] excludedRoots)
name
- the nameroots
- the rootsexcludedRoots
- the excluded roots
IllegalArgumentException
- for null rootsMethod Detail |
---|
public static VFSClassLoaderPolicy createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile... roots)
roots
- the roots
IllegalArgumentException
- for null rootspublic static VFSClassLoaderPolicy createVFSClassLoaderPolicy(String name, org.jboss.virtual.VirtualFile... roots)
name
- a name of the policyroots
- the roots
IllegalArgumentException
- for null rootspublic static VFSClassLoaderPolicy createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots, org.jboss.virtual.VirtualFile[] excludedRoots)
roots
- the rootsexcludedRoots
- the excluded roots
IllegalArgumentException
- for null rootspublic static VFSClassLoaderPolicy createVFSClassLoaderPolicy(String name, org.jboss.virtual.VirtualFile[] roots, org.jboss.virtual.VirtualFile[] excludedRoots)
name
- a name of the policyroots
- the rootsexcludedRoots
- the excluded roots
IllegalArgumentException
- for null rootspublic String getName()
BaseClassLoaderPolicy
getName
in class BaseClassLoaderPolicy
public List<? extends DelegateLoader> getDelegates()
ClassLoaderPolicy
There are no imports by default
NOTE: Protected access for security reasons
getDelegates
in class ClassLoaderPolicy
public void setDelegates(List<? extends DelegateLoader> delegates)
delegates
- the delegates.public ClassFilter getIncluded()
public void setIncluded(ClassFilter included)
included
- the included.public ClassFilter getExcluded()
public void setExcluded(ClassFilter excluded)
excluded
- the excluded.public ClassFilter getExcludedExport()
public void setExcludedExport(ClassFilter excludedExport)
excludedExport
- the excludedExport.public ExportAll getExportAll()
public void setExportAll(ExportAll exportAll)
exportAll
- the exportAll.public String[] getExportedPackages()
public void setExportedPackages(String[] exportedPackages)
exportedPackages
- the exportedPackages.public String[] getPackageNames()
ClassLoaderPolicy
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 ClassLoaderPolicy
public boolean isImportAll()
ClassLoaderPolicy
False by default
isImportAll
in class ClassLoaderPolicy
public void setImportAll(boolean importAll)
importAll
- the importAll.public boolean isCacheable()
ClassLoaderPolicy
True by default
isCacheable
in class ClassLoaderPolicy
public void setCacheable(boolean cacheable)
cacheable
- the cacheable.public boolean isBlackListable()
ClassLoaderPolicy
True by default
isBlackListable
in class ClassLoaderPolicy
public void setBlackListable(boolean blackListable)
blackListable
- the blackListable.public DelegateLoader getExported()
ClassLoaderPolicy
By default this uses ClassLoaderPolicy.getPackageNames()
to create a FilteredDelegateLoader
getExported
in class ClassLoaderPolicy
public URL getResource(String path)
ClassLoaderPolicy
getResource
in class ClassLoaderPolicy
path
- the path
public InputStream getResourceAsStream(String path)
ClassLoaderPolicy
Uses ClassLoaderPolicy.getResource(String)
by default
getResourceAsStream
in class ClassLoaderPolicy
path
- the path
public boolean isUseRealURL()
public void setUseRealURL(boolean useRealURL)
useRealURL
- the real url flagpublic void getResources(String name, Set<URL> urls) throws IOException
ClassLoaderPolicy
getResources
in class ClassLoaderPolicy
name
- the resource nameurls
- the list of urls to add to
IOException
- for any errorprotected org.jboss.virtual.VirtualFile findChild(String path)
path
- the path
protected org.jboss.virtual.VirtualFile findRoot(String path)
path
- the path
protected org.jboss.classloading.spi.vfs.policy.VFSClassLoaderPolicy.VirtualFileInfo findVirtualFileInfo(String path)
path
- the path
public PackageInformation getClassPackageInformation(String className, String packageName)
ClassLoaderPolicy
The default is to invoke getPackageInformation for the class's package
getClassPackageInformation
in class ClassLoaderPolicy
className
- name the class namepackageName
- the package information
protected void toLongString(StringBuilder builder)
BaseClassLoaderPolicy
toLongString
in class ClassLoaderPolicy
builder
- the builderprotected ProtectionDomain getProtectionDomain(String className, String path)
ClassLoaderPolicy
By default there is no protection domain
NOTE: Protected access for security reasons
getProtectionDomain
in class ClassLoaderPolicy
className
- the class namepath
- the path
protected boolean checkFilters(String path, String context)
path
- the path to checkcontext
- the context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |