saker.java.compiler Documentation TaskDoc JavaDoc Packages
Specifies an annotation processor to use during Java compilation. Annotation processors are plugins into the Java compiler, in which they can examine the source elements and generate other classes and resources based on them. Processors can be configured using the Options field which provide them string based key-value configurations. Processors can be created by other tasks in the build system, e.g. saker.java.processor(). See the documentation of your processor of interest to view the exact mechanism. In order to properly support incremental compilation, it is recommended to properly configure the processor by specifying whether the processor is Aggregating via the associated field.
Summary
Fields
AggregatingSpecifies whether or not the processor aggregates its input to generate classes or resources.
AlwaysRunSpecifies whether to given processor should always run, even if there are no relevant source element changes.
ConsistentSpecifies whether or not the processor is Consistent.
OptionsSpecifies private options to the processor.
ProcessorSpecifies the processor that is used during compilation.
SuppressWarningsSpecifies the warning types which should be suppressed for this processor.
Fields
Specifies whether or not the processor aggregates its input to generate classes or resources. The default value is true. A processor is considered to be Aggregating if there exists an addition-wise modification to the compiled Java classes that causes it to generate different classes or resources. E.g. if a processor generates a list of classes that were compiled, then it is considered to be Aggregating, as adding a new class will result in generating a different list. E.g. if a processor generates one resource for each one of the input Java classes, then it is NOT considered to be aggregating, as the previously generated resources are still the same. The only change happens is that the processor will create a new resource for the newly added class. In general, if your processor generates resources in a multi->one relation, then it should be Aggregating. We recommend extensive testing before setting a process configuration to non-Aggregating.
Specifies whether to given processor should always run, even if there are no relevant source element changes. The default value is false.
Specifies whether or not the processor is Consistent. The default value is true. A processor is considered to be consistent if it doesn't generate different classes or resources based on environmental changes not visible to the Java comiler. E.g. a processor that includes the current date in the generated classes or resources is NOT consistent.
Specifies private options to the processor. Unlike the AnnotationProcessorOptions parameter of saker.java.compile(), this specifies string key-value options which are private to this annotation processor. The options specified here will not be visible to others processors used during the same Java compilation.
Specifies the processor that is used during compilation.
Specifies the warning types which should be suppressed for this processor. Unline the global SuppressWarnings option in saker.java.compile(), the warning suppressions defined in this option will only affect the diagnostics produced by this processor.