public class ApplicationClassloader extends ClassLoader
Modifier and Type | Field and Description |
---|---|
ApplicationClassloaderState |
currentState
A representation of the current state of the ApplicationClassloader.
|
ProtectionDomain |
protectionDomain
This protection domain applies to all loaded classes.
|
Constructor and Description |
---|
ApplicationClassloader() |
Modifier and Type | Method and Description |
---|---|
void |
detectChanges()
Detect Java changes
|
List<Class> |
getAllClasses()
Try to load all .java files found.
|
List<Class> |
getAnnotatedClasses(Class[] clazz) |
List<Class> |
getAnnotatedClasses(Class<? extends Annotation> clazz)
Retrieve all application classes with a specific annotation.
|
List<Class> |
getAssignableClasses(Class clazz)
Retrieve all application classes assignable to this class.
|
Class |
getClassIgnoreCase(String name)
Find a class in a case insensitive way
|
URL |
getResource(String name) |
InputStream |
getResourceAsStream(String name) |
Enumeration<URL> |
getResources(String name) |
Class<?> |
loadApplicationClass(String name) |
protected Class<?> |
loadClass(String name,
boolean resolve) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getClassLoadingLock, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, registerAsParallelCapable, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
public ApplicationClassloaderState currentState
public ProtectionDomain protectionDomain
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
public InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
public URL getResource(String name)
getResource
in class ClassLoader
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
public void detectChanges() throws RestartNeededException
RestartNeededException
public List<Class> getAllClasses()
public List<Class> getAssignableClasses(Class clazz)
clazz
- The superclass, or the interface.public Class getClassIgnoreCase(String name)
name
- The class name.public List<Class> getAnnotatedClasses(Class<? extends Annotation> clazz)
clazz
- The annotation class.Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly