private void dumpProcessingResult(HandlerProcessingResult result) { if (result==null || !AnnotationUtils.shouldLog("annotation")) { return; } Map<Class<? extends Annotation>, ResultType> annotationResults = result.processedAnnotations(); for (Map.Entry<Class<? extends Annotation>, ResultType> element : annotationResults.entrySet()) { logger.finer("Annotation " + element.getKey() + " : " + element.getValue()); } } public void pushAnnotationHandler(AnnotationHandler handler) {
private void dumpProcessingResult(HandlerProcessingResult result) { if (result==null || !AnnotationUtils.shouldLog("annotation")) { return; } Map<Class<? extends Annotation>, ResultType> annotationResults = result.processedAnnotations(); for (Map.Entry<Class<? extends Annotation>, ResultType> element : annotationResults.entrySet()) { logger.finer("Annotation " + element.getKey() + " : " + element.getValue()); } } public void pushAnnotationHandler(AnnotationHandler handler) {
/** * @return the previously set ClientContext casted to the requestd * type if possible or throw an exception otherwise. */ public <U extends AnnotatedElementHandler> U getHandler(Class<U> contextType) throws ClassCastException { if (handlers.isEmpty()) return null; if (AnnotationUtils.shouldLog("handler")) { AnnotationUtils.getLogger().finer("Top handler is " + handlers.peek()); } return contextType.cast(handlers.peek()); }
/** * @return the previously set ClientContext casted to the requestd * type if possible or throw an exception otherwise. */ public <U extends AnnotatedElementHandler> U getHandler(Class<U> contextType) throws ClassCastException { if (handlers.isEmpty()) return null; if (AnnotationUtils.shouldLog("handler")) { AnnotationUtils.getLogger().finer("Top handler is " + handlers.peek()); } return contextType.cast(handlers.peek()); }
private void logEnd(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " END : " + c); } // pop it from our annotated element stack annotatedElements.pop(); if(delegate!=null) { delegate.getStack().pop(); } if (handler!=null) { handler.endElement(type, c); } }
private void logEnd(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " END : " + c); } // pop it from our annotated element stack annotatedElements.pop(); if(delegate!=null) { delegate.getStack().pop(); } if (handler!=null) { handler.endElement(type, c); } }
private void logStart(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " START : " + c); } // push it to our annotated element stack annotatedElements.push(new StackElement(type, c)); if(delegate!=null) { delegate.getStack().push(new StackElement(type, c)); } if (handler!=null) { handler.startElement(type, c); } }
private void logStart(AnnotatedElementHandler handler, ElementType type, AnnotatedElement c) throws AnnotationProcessorException { if (AnnotationUtils.shouldLog("types")) { AnnotationUtils.getLogger().finer(type + " START : " + c); } // push it to our annotated element stack annotatedElements.push(new StackElement(type, c)); if(delegate!=null) { delegate.getStack().push(new StackElement(type, c)); } if (handler!=null) { handler.startElement(type, c); } }
private HandlerProcessingResult processAnnotations(ProcessingContext ctx, AnnotatedElement element) throws AnnotationProcessorException { HandlerProcessingResultImpl result= new HandlerProcessingResultImpl(); try{ for (Annotation annotation : element.getAnnotations()) { // initialize the result... AnnotationInfo subElement = new AnnotationInfo(ctx, element, annotation, getTopElementType()); if (!result.processedAnnotations().containsKey(annotation.annotationType())) { process(ctx, subElement, result); } else { if (AnnotationUtils.shouldLog("annotation")) { logger.finer("Annotation " + annotation.annotationType() + " already processed"); } } } } catch (ArrayStoreException e) { logger.info("Exception " + e.toString() + " encountered while processing annotaton for element " + element + ". Message is: " + e.getMessage() + ". Ignoring annotations and proceeding."); } return result; }
private HandlerProcessingResult processAnnotations(ProcessingContext ctx, AnnotatedElement element) throws AnnotationProcessorException { HandlerProcessingResultImpl result= new HandlerProcessingResultImpl(); try{ for (Annotation annotation : element.getAnnotations()) { // initialize the result... AnnotationInfo subElement = new AnnotationInfo(ctx, element, annotation, getTopElementType()); if (!result.processedAnnotations().containsKey(annotation.annotationType())) { process(ctx, subElement, result); } else { if (AnnotationUtils.shouldLog("annotation")) { logger.finer("Annotation " + annotation.annotationType() + " already processed"); } } } } catch (ArrayStoreException e) { logger.info("Exception " + e.toString() + " encountered while processing annotaton for element " + element + ". Message is: " + e.getMessage() + ". Ignoring annotations and proceeding."); } return result; }
if (AnnotationUtils.shouldLog("annotation")) { logger.finer("Annotation : " + annotation.annotationType().getName() + " delegate = " + delegate);
if (AnnotationUtils.shouldLog("annotation")) { logger.finer("Annotation : " + annotation.annotationType().getName() + " delegate = " + delegate);