@Override protected HandlerProcessingResult processAnnotation( AnnotationInfo ainfo, WebBundleContext webBundleContext) throws AnnotationProcessorException { WebServlet webServletAn = (WebServlet)ainfo.getAnnotation(); Class webCompClass = (Class)ainfo.getAnnotatedElement(); String servletName = webServletAn.name(); if (servletName == null || servletName.length() == 0) { servletName = webCompClass.getName(); } WebComponentDescriptor webCompDesc = webBundleContext.getDescriptor().getWebComponentByCanonicalName(servletName); if (webCompDesc == null) { webCompDesc = new WebComponentDescriptor(); webCompDesc.setName(servletName); webCompDesc.setCanonicalName(servletName); } HandlerProcessingResult result = processAnnotation(ainfo, webCompDesc); if (result.getOverallResult() == ResultType.PROCESSED) { webBundleContext.getDescriptor().addWebComponentDescriptor(webCompDesc); WebComponentContext webCompContext = new WebComponentContext(webCompDesc); // we push the new context on the stack... webBundleContext.getProcessingContext().pushHandler(webCompContext); } return result; }
wcd.setCanonicalName(wrapper.getName()); wbd.addWebComponentDescriptor(wcd); String servletClassName = wrapper.getServletClassName();
/** * The copy constructor. */ public WebComponentDescriptor(WebComponentDescriptor other) { setCanonicalName(other.getCanonicalName()); setServlet(other.isServlet()); setWebComponentImplementation( other.getWebComponentImplementation()); getInitializationParameterSet().addAll( other.getInitializationParameterSet()); getUrlPatternsSet().addAll(other.getUrlPatternsSet()); setLoadOnStartUp(other.getLoadOnStartUp()); getSecurityRoleReferenceSet().addAll( other.getSecurityRoleReferenceSet()); setRunAsIdentity(other.getRunAsIdentity()); setAsyncSupported(other.isAsyncSupported()); setMultipartConfig(other.getMultipartConfig()); setWebBundleDescriptor(other.getWebBundleDescriptor()); setConflict(other.isConflict()); }