org.apache.myfaces.config.annotation
Class NoInjectionAnnotationLifecycleProvider

java.lang.Object
  extended by org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
All Implemented Interfaces:
LifecycleProvider, LifecycleProvider2
Direct Known Subclasses:
ResourceAnnotationLifecycleProvider

public class NoInjectionAnnotationLifecycleProvider
extends Object
implements LifecycleProvider2

See SRV.14.5 Servlet Specification Version 2.5 JSR 154 and Common Annotations for the Java Platform JSR 250


Constructor Summary
NoInjectionAnnotationLifecycleProvider()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoInjectionAnnotationLifecycleProvider

public NoInjectionAnnotationLifecycleProvider()
Method Detail

newInstance

public Object newInstance(String className)
                   throws InstantiationException,
                          IllegalAccessException,
                          NamingException,
                          InvocationTargetException,
                          ClassNotFoundException
Description copied from interface: LifecycleProvider2
Create an object of the class with the supplied name, inject dependencies as appropriate.

Specified by:
newInstance in interface LifecycleProvider
Specified by:
newInstance in interface LifecycleProvider2
Parameters:
className - name of the class of the desired object
Returns:
a fully constructed, dependency-injected, and initialized object.
Throws:
InstantiationException
IllegalAccessException
NamingException
InvocationTargetException
ClassNotFoundException

postConstruct

public void postConstruct(Object instance)
                   throws IllegalAccessException,
                          InvocationTargetException
Call postConstruct method on the specified instance.

Specified by:
postConstruct in interface LifecycleProvider2
Parameters:
instance - object to initialize
Throws:
IllegalAccessException
InvocationTargetException

destroyInstance

public void destroyInstance(Object instance)
                     throws IllegalAccessException,
                            InvocationTargetException
Description copied from interface: LifecycleProvider
Take whatever steps are needed to shut down the object, including calling a preDestroy method.

Specified by:
destroyInstance in interface LifecycleProvider
Parameters:
instance - object to shut down.
Throws:
IllegalAccessException
InvocationTargetException

processAnnotations

protected void processAnnotations(Object instance)
                           throws IllegalAccessException,
                                  InvocationTargetException,
                                  NamingException
Inject resources in specified instance.

Throws:
IllegalAccessException
InvocationTargetException
NamingException


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.