/** * Process a set of classes from the parameter list rather than from the * processing context. This allow the annotation handlers to call be the * annotation processing tool when classes need to be processed in a * particular context rather than when they are picked up by the scanner. * * @param ctx the processing context * @param classes the list of classes to process * @return the processing result for such classes * @throws AnnotationProcessorException if handlers fail to process * an annotation */ public ProcessingResult process(ProcessingContext ctx, Class[] classes) throws AnnotationProcessorException { ProcessingResultImpl result = new ProcessingResultImpl(); for (Class c : classes) { result.add(process(ctx, c)); } return result; }
public void add(ProcessingResult pr) { Map<AnnotatedElement, HandlerProcessingResult> results = pr.getResults(); for (Map.Entry<AnnotatedElement, HandlerProcessingResult> element : results.entrySet()) { add(element.getKey(), element.getValue()); } }
public void add(ProcessingResult pr) { Map<AnnotatedElement, HandlerProcessingResult> results = pr.getResults(); for (Map.Entry<AnnotatedElement, HandlerProcessingResult> element : results.entrySet()) { add(element.getKey(), element.getValue()); } }
/** * Process a set of classes from the parameter list rather than from the * processing context. This allow the annotation handlers to call be the * annotation processing tool when classes need to be processed in a * particular context rather than when they are picked up by the scanner. * * @param ctx the processing context * @param classes the list of classes to process * @return the processing result for such classes * @throws AnnotationProcessorException if handlers fail to process * an annotation */ public ProcessingResult process(ProcessingContext ctx, Class[] classes) throws AnnotationProcessorException { ProcessingResultImpl result = new ProcessingResultImpl(); for (Class c : classes) { result.add(process(ctx, c)); } return result; }
/** * Starts the annotation processing tool passing the processing context which * encapuslate all information necessary for the configuration of the tool. * @param ctx is the initialized processing context * @return the result of the annoations processing */ public ProcessingResult process(ProcessingContext ctx) throws AnnotationProcessorException { Scanner<Object> scanner = ctx.getProcessingInput(); ProcessingResultImpl result = new ProcessingResultImpl(); errorCount=0; for (Class c : scanner.getElements()) { result.add(process(ctx, c)); } return result; }
/** * Starts the annotation processing tool passing the processing context which * encapuslate all information necessary for the configuration of the tool. * @param ctx is the initialized processing context * @return the result of the annoations processing */ public ProcessingResult process(ProcessingContext ctx) throws AnnotationProcessorException { Scanner<Object> scanner = ctx.getProcessingInput(); ProcessingResultImpl result = new ProcessingResultImpl(); errorCount=0; for (Class c : scanner.getElements()) { result.add(process(ctx, c)); } return result; }
ProcessingResultImpl result = new ProcessingResultImpl(); if (classPackage != null && visitedPackages.add(classPackage)) { result.add(classPackage, processAnnotations(ctx, ElementType.PACKAGE, classPackage)); result.add(c, processAnnotations(ctx, c)); result.add(field,processAnnotations(ctx, ElementType.FIELD, field)); result.add(constructor, processAnnotations(ctx, constructor)); result.add(method, processAnnotations(ctx, method)); result.add(c, processAnnotations(ctx, currentClass)); currentClass = currentClass.getSuperclass();
ProcessingResultImpl result = new ProcessingResultImpl(); if (classPackage != null && visitedPackages.add(classPackage)) { result.add(classPackage, processAnnotations(ctx, ElementType.PACKAGE, classPackage)); result.add(c, processAnnotations(ctx, c)); result.add(field,processAnnotations(ctx, ElementType.FIELD, field)); result.add(constructor, processAnnotations(ctx, constructor)); result.add(method, processAnnotations(ctx, method)); result.add(c, processAnnotations(ctx, currentClass)); currentClass = currentClass.getSuperclass();