Loads an annotation processor from the specified class path to be used with saker.java.compile().
The task will load the class path based on the parameters and create an annotation processor configuration that can be used with the Java compiler task. The specified class path and SDKs have no effect on the configuration of the compilation task.
The task allows configuring some of the processor aspects, whether it is Aggregating, Consistent, or if it should AlwaysRun. Note that these properties can be overridden when the processor is passed to the compilation task.
Summary
Aggregating | Specifies whether or not the processor aggregates its input to generate classes or resources. |
AlwaysRun | Specifies whether to given processor should always run, even if there are no relevant source element changes. |
Class | Required parameter. Specifies the class name of the processor to be loaded.
|
ClassPath | The class path to load the processor from. |
Consistent | Specifies whether or not the processor is Consistent. |
SDKs | Specifies the SDKs used by the task to resolve class paths. |
Parameters
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.
This value may be overriden by the saker.java.compile() AnnotationProcessor parameter.
Specifies whether to given processor should always run, even if there are no relevant source element changes.
The default value is false.
This value may be overriden by the saker.java.compile() AnnotationProcessor parameter.
Required parameter.
Specifies the class name of the processor to be loaded.
The class name must be explicitly specified in order to avoid ambiguity. The task implementation doesn't use ServiceLoader or other automatic discovery mechanisms.Collection of JavaClassPathTaskOption
The class path to load the processor from.
The class path can be specified the same way as in saker.java.compile(). It can accept paths to JARs or class directories, wildcards of theirs, outputs of previous compilations, paths based on SDKs, or class paths from other tasks.
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.
This value may be overriden by the saker.java.compile() AnnotationProcessor parameter.
Map of SDKName : SDKDescriptionTaskOption
Specifies the SDKs used by the task to resolve class paths.
If any class path entry is specified that uses a given SDK, then it will be resolved using SDKS defined in this parameter. Works similarly as the SDK parameter in saker.java.compile().