public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo)
throws AnnotationProcessorException {
AnnotatedElementHandler aeHandler = ainfo.getProcessingContext().getHandler();
if (aeHandler instanceof WebBundleContext) {
WebBundleContext webBundleContext = (WebBundleContext)aeHandler;
AnnotatedElementHandler aeh = webBundleContext.createContextForWeb();
if (aeh != null) {
aeHandler = aeh;
}
}
//no inheritance
HandlerProcessingResult procResult = null;
if (aeHandler instanceof WebComponentContext) {
procResult = processAnnotation(ainfo,
new WebComponentContext[] { (WebComponentContext)aeHandler });
} else if (aeHandler instanceof WebComponentsContext) {
WebComponentsContext webCompsContext = (WebComponentsContext)aeHandler;
procResult = processAnnotation(ainfo, webCompsContext.getWebComponentContexts());
} else if (aeHandler instanceof WebBundleContext) {
WebBundleContext webBundleContext = (WebBundleContext)aeHandler;
procResult = processAnnotation(ainfo, webBundleContext);
} else {
return getInvalidAnnotatedElementHandlerResult(aeHandler, ainfo);
}