public class NoInjectionAnnotationLifecycleProvider extends Object implements LifecycleProvider2
Constructor and Description |
---|
NoInjectionAnnotationLifecycleProvider() |
Modifier and Type | Method and Description |
---|---|
void |
destroyInstance(Object instance)
Take whatever steps are needed to shut down the object, including calling a preDestroy method.
|
Object |
newInstance(String className)
Create an object of the class with the supplied name, inject dependencies as appropriate.
|
void |
postConstruct(Object instance)
Call postConstruct method on the specified instance.
|
protected void |
processAnnotations(Object instance)
Inject resources in specified instance.
|
public NoInjectionAnnotationLifecycleProvider()
public Object newInstance(String className) throws InstantiationException, IllegalAccessException, NamingException, InvocationTargetException, ClassNotFoundException
LifecycleProvider2
newInstance
in interface LifecycleProvider
newInstance
in interface LifecycleProvider2
className
- name of the class of the desired objectInstantiationException
IllegalAccessException
NamingException
InvocationTargetException
ClassNotFoundException
public void postConstruct(Object instance) throws IllegalAccessException, InvocationTargetException
postConstruct
in interface LifecycleProvider2
instance
- object to initializeIllegalAccessException
InvocationTargetException
public void destroyInstance(Object instance) throws IllegalAccessException, InvocationTargetException
LifecycleProvider
destroyInstance
in interface LifecycleProvider
instance
- object to shut down.IllegalAccessException
InvocationTargetException
protected void processAnnotations(Object instance) throws IllegalAccessException, InvocationTargetException, NamingException
Copyright © 2020 The Apache Software Foundation. All rights reserved.