public class InstanceManager extends Object implements org.apache.tomcat.InstanceManager
| Constructor and Description |
|---|
InstanceManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroyInstance(Object instance) |
protected int |
getAnnotationCacheSize()
Makes cache size available to unit tests.
|
static String |
getName(Method setter) |
protected Class<?> |
loadClassMaybePrivileged(String className,
ClassLoader classLoader) |
Object |
newInstance(Class<?> clazz) |
void |
newInstance(Object o) |
Object |
newInstance(String className) |
Object |
newInstance(String className,
ClassLoader classLoader) |
protected void |
populateAnnotationsCache(Class<?> clazz,
Map<String,String> injections)
Make sure that the annotations cache has been populated for the provided
class.
|
protected void |
preDestroy(Object instance,
Class<?> clazz)
Call preDestroy method on the specified instance recursively from deepest
superclass to actual class.
|
public Object newInstance(String className) throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException
newInstance in interface org.apache.tomcat.InstanceManagerIllegalAccessExceptionInvocationTargetExceptionInstantiationExceptionClassNotFoundExceptionpublic Object newInstance(String className, ClassLoader classLoader) throws IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException
newInstance in interface org.apache.tomcat.InstanceManagerIllegalAccessExceptionInvocationTargetExceptionInstantiationExceptionClassNotFoundExceptionpublic void newInstance(Object o) throws IllegalAccessException, InvocationTargetException
newInstance in interface org.apache.tomcat.InstanceManagerIllegalAccessExceptionInvocationTargetExceptionpublic Object newInstance(Class<?> clazz) throws IllegalAccessException, InvocationTargetException, NamingException, InstantiationException
newInstance in interface org.apache.tomcat.InstanceManagerIllegalAccessExceptionInvocationTargetExceptionNamingExceptionInstantiationExceptionpublic void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
destroyInstance in interface org.apache.tomcat.InstanceManagerIllegalAccessExceptionInvocationTargetExceptionprotected void preDestroy(Object instance, Class<?> clazz) throws IllegalAccessException, InvocationTargetException
instance - object to call preDestroy methods onclazz - (super) class to examine for preDestroy annotation.IllegalAccessException - if preDestroy method is inaccessible.InvocationTargetException - if call failsprotected void populateAnnotationsCache(Class<?> clazz, Map<String,String> injections) throws IllegalAccessException, InvocationTargetException
clazz - clazz to populate annotations forinjections - map of injections for this class from xml deployment
descriptorIllegalAccessException - if injection target is inaccessibleInvocationTargetException - if injection failsprotected int getAnnotationCacheSize()
protected Class<?> loadClassMaybePrivileged(String className, ClassLoader classLoader) throws ClassNotFoundException
ClassNotFoundExceptionCopyright © 2006–2019 OPS4J - Open Participation Software for Java. All rights reserved.