## org.apache.catalina.util
Class DefaultAnnotationProcessor

    java.lang.Object
      org.apache.catalina.util.DefaultAnnotationProcessor

All Implemented Interfaces:
  AnnotationProcessor

    public class DefaultAnnotationProcessor

extends java.lang.Object
implements AnnotationProcessor

Verify the annotation and Process it.

Version:
  $Revision: 711501 $, $Date: 2008-11-05 04:22:31 +0100 (Wed, 05 Nov 2008) $
Author:
  Fabien Carrion, Remy Maucherat

Field Summary
`protected javax.naming.Context` `context`

Constructor Summary
`DefaultAnnotationProcessor(javax.naming.Context context)`

Method Summary
`protected static void` `lookupFieldResource(javax.naming.Context context, java.lang.Object instance, java.lang.reflect.Field field, java.lang.String name, java.lang.Class<?> clazz)` Inject resources in specified field.
`protected static void` `lookupMethodResource(javax.naming.Context context, java.lang.Object instance, java.lang.reflect.Method method, java.lang.String name, java.lang.Class<?> clazz)` Inject resources in specified method.
`void` `postConstruct(java.lang.Object instance)` Call postConstruct method on the specified instance.
`void` `preDestroy(java.lang.Object instance)` Call preDestroy method on the specified instance.
`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`

Field Detail

### context

    protected javax.naming.Context context

Constructor Detail

### DefaultAnnotationProcessor

    public DefaultAnnotationProcessor(javax.naming.Context context)

Method Detail

### postConstruct

    public void postConstruct(java.lang.Object instance)
                       throws java.lang.IllegalAccessException,
                              java.lang.reflect.InvocationTargetException

  Call postConstruct method on the specified instance.

  Specified by:
    `postConstruct` in interface `AnnotationProcessor`
  Throws:
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`

### preDestroy

    public void preDestroy(java.lang.Object instance)
                    throws java.lang.IllegalAccessException,
                           java.lang.reflect.InvocationTargetException

  Call preDestroy method on the specified instance.

  Specified by:
    `preDestroy` in interface `AnnotationProcessor`
  Throws:
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`

### processAnnotations

    public void processAnnotations(java.lang.Object instance)
                            throws java.lang.IllegalAccessException,
                                   java.lang.reflect.InvocationTargetException,
                                   javax.naming.NamingException

  Inject resources in specified instance.

  Specified by:
    `processAnnotations` in interface `AnnotationProcessor`
  Throws:
    `java.lang.IllegalAccessException`
    `java.lang.reflect.InvocationTargetException`
    `javax.naming.NamingException`

### lookupFieldResource

    protected static void lookupFieldResource(javax.naming.Context context,
                                              java.lang.Object instance,
                                              java.lang.reflect.Field field,
                                              java.lang.String name,
                                              java.lang.Class<?> clazz)
                                       throws javax.naming.NamingException,
                                              java.lang.IllegalAccessException

  Inject resources in specified field.

  Throws:
    `javax.naming.NamingException`
    `java.lang.IllegalAccessException`

### lookupMethodResource

    protected static void lookupMethodResource(javax.naming.Context context,
                                               java.lang.Object instance,
                                               java.lang.reflect.Method method,
                                               java.lang.String name,
                                               java.lang.Class<?> clazz)
                                        throws javax.naming.NamingException,
                                               java.lang.IllegalAccessException,
                                               java.lang.reflect.InvocationTargetException

  Inject resources in specified method.

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

Copyright © 2000-2008 Apache Software Foundation. All Rights Reserved.