On 10/13/15, 1:32 AM, Richard Evans wrote:
> I'm experimenting with a ServletContainerInitializer. I'd like to
> find all annotation classes with are themselves annotated with a
> specific annotation - for example @A.
>
> So I have A.class in the @HandlesTypes annotaton of the
> ServletContainerInitializer. But I am getting different results
> depending on application server.
>
> In WebLogic 12 onStartup /is/ passed annotation classes which are
> annotated with @A. In Tomcat 8 I do not get these classes.
>
> The servlet 3.1 spec says:
>
> "The HandlesTypes annotation on the implementation of the
> ServletContainerInitializer is used to express interest in classes
> that may have annotations (type, method or field level annotations)
> specified in the value of the HandlesTypes or if it extends/implements
> one those classes anywhere in the class' super types."
>
> Does class here imply a concrete class? Or can be be anything -
> interface, annotation - which has a corresponding Java class?
Yes, it means "concrete class" here.
Shing Wai Chan
>
> Thanks
>
> Richard
>
> --
> Oracle <http://www.oracle.com>
> Richard Evans | Product Architect
> Phone: +44 1223 228408 <tel:+44%201223%20228408> | Mobile: +44 7973
> 839664 <tel:+44%207973%20839664>
> Oracle Product Development
> Newton House Cambridge Business Park | Cambridge | CB4 0WZ | United
> Kingdom
>
> ORACLE Corporation UK Ltd is a company incorporated in England & Wales
> | Company Reg. No. 1782505 | Reg. office: Oracle Parkway, Thames
> Valley Park, Reading RG6 1RA
> Green Oracle <http://www.oracle.com/commitment> Oracle is committed to
> developing practices and products that help protect the environment