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 AnnotationParser

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

    public class AnnotationParser

extends Object

AnnotationParser None of the common annotations are inheritable, thus calling getAnnotations() is exactly equivalent to getDeclaredAnnotations(). Therefore, in order to find all relevant annotations, the full inheritance tree of a class must be considered. From the spec: Class-level annotations only affect the class they annotate and their members, that is, its methods and fields. They never affect a member declared by a superclass, even if it is not hidden or overridden by the class in question. In addition to affecting the annotated class, class-level annotations may act as a shorthand for member-level annotations. If a member carries a specific member-level annotation, any annotations of the same type implied by a class-level annotation are ignored. In other words, explicit member-level annotations have priority over member-level annotations implied by a class-level annotation. For example, a @WebService annotation on a class implies that all the public method in the class that it is applied on are annotated with @WebMethod if there is no @WebMethod annotation on any of the methods. However if there is a @WebMethod annotation on any method then the @WebService does not imply the presence of

Constructor Summary
`AnnotationParser()`

Method Summary
`static void` | `parseAnnotations(Class clazz, RunAsCollection runAs, InjectionCollection injections, LifeCycleCallbackCollection callbacks)` Examine the class hierarchy for a class, finding all annotations.

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

Constructor Detail

### AnnotationParser

    public AnnotationParser()

Method Detail

### parseAnnotations

    public static void parseAnnotations(Class clazz,
                                        RunAsCollection runAs,
                                        InjectionCollection injections,
                                        LifeCycleCallbackCollection callbacks)

  Examine the class hierarchy for a class, finding all annotations. Then, merge any servlet2.5 spec annotations found with those already existing (from parsing web.xml) respecting the overriding rules found in the spec.

  Parameters:
    `clazz` - the class to inspect
    `runAs` - any run-as elements from web.xml
    `injections` - any injections specified in web.xml
    `callbacks` - any postconstruct/predestroy callbacks in web.xml

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.