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
-
Field Summary
Fields inherited from class javax.annotation.processing.AbstractProcessor
processingEnv -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanprocess(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) Methods inherited from class javax.annotation.processing.AbstractProcessor
getCompletions, getSupportedAnnotationTypes, getSupportedOptions, init, isInitialized
-
Constructor Details
-
DemoSourceProcessor
public DemoSourceProcessor()
-
-
Method Details
-
getSupportedSourceVersion
- Specified by:
getSupportedSourceVersionin interfaceProcessor- Overrides:
getSupportedSourceVersionin classAbstractProcessor
-
process
- Specified by:
processin interfaceProcessor- Specified by:
processin classAbstractProcessor
-