Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.mortbay.jetty.annotations
Class AnnotationCollection

    java.lang.Object
      org.mortbay.jetty.annotations.AnnotationCollection

    public class AnnotationCollection

extends Object

AnnotationCollection An AnnotationCollection represents all of the annotated classes, methods and fields in the inheritance hierarchy for a class. NOTE that methods and fields in this collection are NOT just the ones that are inherited by the class, but represent ALL annotations that must be processed for a single instance of a given class. The class to which this collection pertains is obtained by calling getTargetClass(). Using the list of annotated classes, methods and fields, the collection will generate the appropriate JNDI entries and the appropriate Injection and LifeCycleCallback objects to be later applied to instances of the getTargetClass().

Constructor Summary
`AnnotationCollection()`

Method Summary
`void` | `addClass(Class clazz)`
`void` | `addField(Field field)`
`void` | `addMethod(Method method)`
`List` | `getClasses()`
`List` | `getFields()`
`List` | `getMethods()`
`Class` | `getTargetClass()` Get the class which is the subject of these annotations
`LifeCycleCallbackCollection` | `processLifeCycleCallbackAnnotations(LifeCycleCallbackCollection callbacks)` Process @PostConstruct and @PreDestroy annotations.
`InjectionCollection` | `processResourceAnnotations(InjectionCollection injections)` Process @Resource annotations at the class, method and field level.
`void` | `processResourcesAnnotations()` Process @Resources annotation on classes
`void` | `processRunAsAnnotations(RunAsCollection runAsCollection)`
`void` | `setTargetClass(Class clazz)` Set the class to which this collection pertains

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AnnotationCollection

    public AnnotationCollection()

Method Detail

### getTargetClass

    public Class getTargetClass()

  Get the class which is the subject of these annotations

  Returns:
    the clazz

### setTargetClass

    public void setTargetClass(Class clazz)

  Set the class to which this collection pertains

  Parameters:
    `clazz` - the clazz to set

### addClass

    public void addClass(Class clazz)

### addMethod

    public void addMethod(Method method)

### addField

    public void addField(Field field)

### getClasses

    public List getClasses()

### getMethods

    public List getMethods()

### getFields

    public List getFields()

### processRunAsAnnotations

    public void processRunAsAnnotations(RunAsCollection runAsCollection)

### processResourceAnnotations

    public InjectionCollection processResourceAnnotations(InjectionCollection injections)

  Process @Resource annotations at the class, method and field level.

  Returns:

### processLifeCycleCallbackAnnotations

    public LifeCycleCallbackCollection processLifeCycleCallbackAnnotations(LifeCycleCallbackCollection callbacks)

  Process @PostConstruct and @PreDestroy annotations.

  Returns:

### processResourcesAnnotations

    public void processResourcesAnnotations()

  Process @Resources annotation on classes

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007 Mort Bay Consulting. All Rights Reserved.