protected HandlerProcessingResult getOverallProcessingResult( List<HandlerProcessingResult> resultList) { HandlerProcessingResult overallProcessingResult = null; for (HandlerProcessingResult result : resultList) { if (overallProcessingResult == null || (result.getOverallResult().compareTo( overallProcessingResult.getOverallResult()) > 0)) { overallProcessingResult = result; } } return overallProcessingResult; }
protected HandlerProcessingResult getOverallProcessingResult( List<HandlerProcessingResult> resultList) { HandlerProcessingResult overallProcessingResult = null; for (HandlerProcessingResult result : resultList) { if (overallProcessingResult == null || (result.getOverallResult().compareTo( overallProcessingResult.getOverallResult()) > 0)) { overallProcessingResult = result; } } return overallProcessingResult; }
public void addAll(HandlerProcessingResult result) { if (result == null) { return; } if (result.getOverallResult().compareTo(overallResult)>0) { overallResult = result.getOverallResult(); } results.putAll(result.processedAnnotations()); }
public void addAll(HandlerProcessingResult result) { if (result == null) { return; } if (result.getOverallResult().compareTo(overallResult)>0) { overallResult = result.getOverallResult(); } results.putAll(result.processedAnnotations()); }
public void add(AnnotatedElement element, HandlerProcessingResult elementResult) { if (elementResult.getOverallResult().compareTo(overallResult)>0) { overallResult = elementResult.getOverallResult(); } if (results.containsKey(element)) { HandlerProcessingResultImpl previousResult = (HandlerProcessingResultImpl) results.get(element); previousResult.addAll(elementResult); } else { if (elementResult instanceof HandlerProcessingResultImpl) { results.put(element, elementResult); } else { HandlerProcessingResultImpl result = new HandlerProcessingResultImpl(); result.addAll(elementResult); results.put(element, result); } } }
public void add(AnnotatedElement element, HandlerProcessingResult elementResult) { if (elementResult.getOverallResult().compareTo(overallResult)>0) { overallResult = elementResult.getOverallResult(); } if (results.containsKey(element)) { HandlerProcessingResultImpl previousResult = (HandlerProcessingResultImpl) results.get(element); previousResult.addAll(elementResult); } else { if (elementResult instanceof HandlerProcessingResultImpl) { results.put(element, elementResult); } else { HandlerProcessingResultImpl result = new HandlerProcessingResultImpl(); result.addAll(elementResult); results.put(element, result); } } }
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException { HandlerProcessingResult result = null; for (WebComponentContext webCompContext : webCompContexts) { result = processAnnotation(ainfo, webCompContext.getDescriptor()); if (result.getOverallResult() == ResultType.FAILED) { break; } } return result; }
@Override protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException { HandlerProcessingResult result = null; for (WebComponentContext webCompContext : webCompContexts) { result = processAnnotation(ainfo, webCompContext.getDescriptor()); if (result.getOverallResult() == ResultType.FAILED) { break; } } return result; }
@Override protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo, WebComponentContext[] webCompContexts) throws AnnotationProcessorException { HandlerProcessingResult result = null; for (WebComponentContext webCompContext : webCompContexts) { result = processAnnotation(ainfo, webCompContext.getDescriptor()); if (result.getOverallResult() == ResultType.FAILED) { break; } } return result; }
public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo) throws AnnotationProcessorException { WebServiceRefs wsRefsAnnotation = (WebServiceRefs) ainfo.getAnnotation(); WebServiceRef[] wsRefAnnotations = wsRefsAnnotation.value(); List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>(); for(WebServiceRef wsRef : wsRefAnnotations) { results.add(processAWsRef(ainfo, wsRef)); } HandlerProcessingResult finalResult = null; for (HandlerProcessingResult result : results) { if (finalResult == null || (result.getOverallResult().compareTo( finalResult.getOverallResult()) > 0)) { finalResult = result; } } return finalResult; } }
public HandlerProcessingResult processAnnotation(AnnotationInfo ainfo) throws AnnotationProcessorException { WebServiceRefs wsRefsAnnotation = (WebServiceRefs) ainfo.getAnnotation(); WebServiceRef[] wsRefAnnotations = wsRefsAnnotation.value(); List<HandlerProcessingResult> results = new ArrayList<HandlerProcessingResult>(); for(WebServiceRef wsRef : wsRefAnnotations) { results.add(processAWsRef(ainfo, wsRef)); } HandlerProcessingResult finalResult = null; for (HandlerProcessingResult result : results) { if (finalResult == null || (result.getOverallResult().compareTo( finalResult.getOverallResult()) > 0)) { finalResult = result; } } return finalResult; } }
@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; }