public class ServiceClassLoader extends CustomURLClassLoader implements ClassAnnotation
| Constructor and Description |
|---|
ServiceClassLoader(String name,
URL[] searchPath,
ClassAnnotator annotator,
ClassLoader parent)
Constructs a new ServiceClassLoader for the specified URLs having the given parent.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addURLs(List<URL> urls)
Appends the specified URLs to the list of URLs to search for classes and resources.
|
String |
getClassAnnotation()
Get the class annotations as determined by the
ClassAnnotator |
ClassAnnotator |
getClassAnnotator()
Get the
ClassAnnotator created at construction time |
List<URL> |
getLibPath() |
URL |
getResource(String name) |
List<URL> |
getSearchPath()
Get the search path of URLs for loading classes and resources
|
URL |
getSlashPath() |
URL[] |
getURLs()
Get the URLs to be used for class annotations as determined by the
ClassAnnotator |
Class<?> |
loadClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
void |
setLibPath(List<URL> urls) |
void |
setParentClassLoader(ClassLoader classLoader) |
void |
setSlashPath(URL url) |
getLogName, toStringaddURL, close, definePackage, findClass, findResource, findResources, getPermissions, getResourceAsStream, newInstance, newInstancedefineClass, defineClassclearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSignerspublic ServiceClassLoader(String name, URL[] searchPath, ClassAnnotator annotator, ClassLoader parent)
searchPath - Array of URLs to search for classesannotator - Array of URLs to use for the codebaseparent - Parent ClassLoader to delegate topublic ClassAnnotator getClassAnnotator()
ClassAnnotator created at construction timepublic URL[] getURLs()
ClassAnnotatorgetURLs in class URLClassLoaderpublic void setParentClassLoader(ClassLoader classLoader) throws Exception
Exceptionpublic List<URL> getSearchPath()
URL[] which corresponds to the search path for the class
loader; that is, the array elements are the locations from which the class loader will load
requested classes.public void addURLs(List<URL> urls)
public void setSlashPath(URL url)
public URL getSlashPath()
public String getClassAnnotation()
ClassAnnotatorgetClassAnnotation in interface ClassAnnotationnullClassAnnotation.getClassAnnotation()public URL getResource(String name)
getResource in class ClassLoaderpublic Class<?> loadClass(String name) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionCopyright © GigaSpaces.