|
||||||||||
| 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 roots
public VFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
roots - the rootsexcludedRoots - the excluded roots
IllegalArgumentException - for null roots
public VFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile[] roots)
name - the nameroots - the roots
IllegalArgumentException - for null roots
public VFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
name - the nameroots - the rootsexcludedRoots - the excluded roots
IllegalArgumentException - for null roots| Method Detail |
|---|
public static VFSClassLoaderPolicy createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile... roots)
roots - the roots
IllegalArgumentException - for null roots
public static VFSClassLoaderPolicy createVFSClassLoaderPolicy(String name,
org.jboss.virtual.VirtualFile... roots)
name - a name of the policyroots - the roots
IllegalArgumentException - for null roots
public static VFSClassLoaderPolicy createVFSClassLoaderPolicy(org.jboss.virtual.VirtualFile[] roots,
org.jboss.virtual.VirtualFile[] excludedRoots)
roots - the rootsexcludedRoots - the excluded roots
IllegalArgumentException - for null roots
public 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 BaseClassLoaderPolicypublic List<? extends DelegateLoader> getDelegates()
ClassLoaderPolicyThere are no imports by default
NOTE: Protected access for security reasons
getDelegates in class ClassLoaderPolicypublic 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()
ClassLoaderPolicyProvides 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 ClassLoaderPolicypublic boolean isImportAll()
ClassLoaderPolicyFalse by default
isImportAll in class ClassLoaderPolicypublic void setImportAll(boolean importAll)
importAll - the importAll.public boolean isCacheable()
ClassLoaderPolicyTrue by default
isCacheable in class ClassLoaderPolicypublic void setCacheable(boolean cacheable)
cacheable - the cacheable.public boolean isBlackListable()
ClassLoaderPolicyTrue by default
isBlackListable in class ClassLoaderPolicypublic void setBlackListable(boolean blackListable)
blackListable - the blackListable.public DelegateLoader getExported()
ClassLoaderPolicy
By default this uses ClassLoaderPolicy.getPackageNames() to create a FilteredDelegateLoader
getExported in class ClassLoaderPolicypublic URL getResource(String path)
ClassLoaderPolicy
getResource in class ClassLoaderPolicypath - the path
public InputStream getResourceAsStream(String path)
ClassLoaderPolicy
Uses ClassLoaderPolicy.getResource(String) by default
getResourceAsStream in class ClassLoaderPolicypath - the path
public boolean isUseRealURL()
public void setUseRealURL(boolean useRealURL)
useRealURL - the real url flag
public void getResources(String name,
Set<URL> urls)
throws IOException
ClassLoaderPolicy
getResources in class ClassLoaderPolicyname - 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)
ClassLoaderPolicyThe default is to invoke getPackageInformation for the class's package
getClassPackageInformation in class ClassLoaderPolicyclassName - name the class namepackageName - the package information
protected void toLongString(StringBuilder builder)
BaseClassLoaderPolicy
toLongString in class ClassLoaderPolicybuilder - the builder
protected ProtectionDomain getProtectionDomain(String className,
String path)
ClassLoaderPolicyBy default there is no protection domain
NOTE: Protected access for security reasons
getProtectionDomain in class ClassLoaderPolicyclassName - 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 | |||||||||