Class DemoSourceProcessor

java.lang.Object
javax.annotation.processing.AbstractProcessor
com.flowingcode.vaadin.addons.demo.DemoSourceProcessor
All Implemented Interfaces:
Processor

@SupportedAnnotationTypes({"com.flowingcode.vaadin.addons.demo.DemoSource","com.flowingcode.vaadin.addons.demo.DemoSources"}) public class DemoSourceProcessor extends AbstractProcessor
Annotation processor that scans sources annotated with DemoSource and copies the referenced source files into the class output (JAR).

This processor is intended to run as part of a Maven build, where StandardLocation.SOURCE_PATH is configured automatically by maven-compiler-plugin. When building inside an IDE, source files are served through other mechanisms (e.g. DevSourceRequestHandler) that bypass the processor output, so SOURCE_PATH may not be available. If javax.tools.Filer#getResource fails, the processor logs a warning and skips the affected file rather than failing the build.

Author:
Javier Godoy / Flowing Code