public class JavaeeInstanceManager
extends java.lang.Object
Constructor and Description |
---|
JavaeeInstanceManager(StandardContext webapp,
WebContext webContext) |
Modifier and Type | Method and Description |
---|---|
void |
destroyInstance(java.lang.Object o) |
ServletContext |
getServletContext() |
void |
inject(java.lang.Object o) |
java.lang.Object |
newInstance(java.lang.Class<?> clazz) |
void |
newInstance(java.lang.Object o) |
java.lang.Object |
newInstance(java.lang.String className) |
java.lang.Object |
newInstance(java.lang.String className,
java.lang.ClassLoader classLoader) |
WebContext.Instance |
newWeakableInstance(java.lang.Class<?> clazz) |
void |
postConstruct(java.lang.Object instance,
java.lang.Class<?> clazz)
Call postConstruct method on the specified instance recursively from deepest superclass to actual class.
|
protected void |
preDestroy(java.lang.Object instance,
java.lang.Class<?> clazz)
Call preDestroy method on the specified instance recursively from deepest superclass to actual class.
|
public JavaeeInstanceManager(StandardContext webapp, WebContext webContext)
public ServletContext getServletContext()
public java.lang.Object newInstance(java.lang.Class<?> clazz) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, javax.naming.NamingException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
java.lang.InstantiationException
public WebContext.Instance newWeakableInstance(java.lang.Class<?> clazz) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, javax.naming.NamingException, java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
java.lang.InstantiationException
public java.lang.Object newInstance(java.lang.String className) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, javax.naming.NamingException, java.lang.InstantiationException, java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
java.lang.InstantiationException
java.lang.ClassNotFoundException
public java.lang.Object newInstance(java.lang.String className, java.lang.ClassLoader classLoader) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, javax.naming.NamingException, java.lang.InstantiationException, java.lang.ClassNotFoundException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
java.lang.InstantiationException
java.lang.ClassNotFoundException
public void newInstance(java.lang.Object o) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, javax.naming.NamingException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
public void destroyInstance(java.lang.Object o) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
public void inject(java.lang.Object o)
public void postConstruct(java.lang.Object instance, java.lang.Class<?> clazz) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
instance
- object to call postconstruct methods onclazz
- (super) class to examine for postConstruct annotation.java.lang.IllegalAccessException
- if postConstruct method is inaccessible.java.lang.reflect.InvocationTargetException
- if call failsprotected void preDestroy(java.lang.Object instance, java.lang.Class<?> clazz) throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
instance
- object to call preDestroy methods onclazz
- (super) class to examine for preDestroy annotation.java.lang.IllegalAccessException
- if preDestroy method is inaccessible.java.lang.reflect.InvocationTargetException
- if call fails