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 |
ClassLoader |
getCodeChangeClassLoader(SupportCodeChangeAnnotationContainer supportCodeChangeAnnotationContainer) |
CodeChangeClassLoadersManager |
getCodeChangeClassLoadersManager() |
List<URL> |
getLibPath() |
URL |
getResource(String name) |
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 |
void |
initCodeChangeClassLoadersManager(boolean supportCodeChange,
int maxClassLoaders) |
Class<?> |
loadClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
void |
setLibPath(List<URL> urls) |
void |
setParentClassLoader(ClassLoader classLoader) |
void |
setSlashPath(URL url) |
findClass, findResource, getLogName, toString
addURL, close, definePackage, findResources, getPermissions, getResourceAsStream, newInstance, newInstance
defineClass, defineClass
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public 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 CodeChangeClassLoadersManager getCodeChangeClassLoadersManager()
public ClassAnnotator getClassAnnotator()
ClassAnnotator
created at construction timepublic URL[] getURLs()
ClassAnnotator
getURLs
in class URLClassLoader
public void setParentClassLoader(ClassLoader classLoader) throws Exception
Exception
public URL[] getSearchPath()
getSearchPath
in class CustomURLClassLoader
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()
ClassAnnotator
getClassAnnotation
in interface ClassAnnotation
null
ClassAnnotation.getClassAnnotation()
public URL getResource(String name)
getResource
in class CustomURLClassLoader
public Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class CustomURLClassLoader
ClassNotFoundException
public ClassLoader getCodeChangeClassLoader(SupportCodeChangeAnnotationContainer supportCodeChangeAnnotationContainer)
public void initCodeChangeClassLoadersManager(boolean supportCodeChange, int maxClassLoaders)
Copyright © GigaSpaces.