org.apache.myfaces.config.annotation
Class NoInjectionAnnotationLifecycleProvider

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

public class NoInjectionAnnotationLifecycleProvider
extends java.lang.Object
implements LifecycleProvider

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(java.lang.Object instance)
          Take whatever steps are needed to shut down the object, including calling a preDestroy method.
 java.lang.Object newInstance(java.lang.String className)
          Create an object of the class with the supplied name, inject dependencies as appropriate, and call a postContruct method as appropriate.
protected  void processAnnotations(java.lang.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 java.lang.Object newInstance(java.lang.String className)
                             throws java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    javax.naming.NamingException,
                                    java.lang.reflect.InvocationTargetException,
                                    java.lang.ClassNotFoundException
Description copied from interface: LifecycleProvider
Create an object of the class with the supplied name, inject dependencies as appropriate, and call a postContruct method as appropriate.

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

destroyInstance

public void destroyInstance(java.lang.Object instance)
                     throws java.lang.IllegalAccessException,
                            java.lang.reflect.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:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

processAnnotations

protected void processAnnotations(java.lang.Object instance)
                           throws java.lang.IllegalAccessException,
                                  java.lang.reflect.InvocationTargetException,
                                  javax.naming.NamingException
Inject resources in specified instance.

Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException


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