@SupportedOptions(value={"project","other.resource.bundles","other.resource.patterns","other.proxy.interfaces","disable.reflect.config","disable.resource.config","disable.proxy.config"})
public class NativeImageConfigGeneratorProcessor
extends AbstractCommandSpecProcessor
ReflectionConfigGenerator,
ResourceConfigGenerator,
DynamicProxyConfigGenerator| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
BASE_PATH
Base path where generated files will be written to: "META-INF/native-image/picocli-generated/".
|
protected java.util.List<picocli.codegen.aot.graalvm.processor.IGenerator> |
generators |
static java.lang.String |
OPTION_PROJECT
Name of the annotation processor option
that can be used to control the actual location where the generated file(s)
are to be written to, relative to the
BASE_PATH. |
processingEnv| Constructor and Description |
|---|
NativeImageConfigGeneratorProcessor() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
handleCommands(java.util.Map<javax.lang.model.element.Element,picocli.CommandLine.Model.CommandSpec> commands,
java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
javax.annotation.processing.RoundEnvironment roundEnv)
Subclasses must implement this method and do something with the
CommandSpec command model objects that were found during compilation. |
void |
init(javax.annotation.processing.ProcessingEnvironment processingEnv) |
error, fatalError, getSupportedAnnotationTypes, logInfo, process, warnpublic static final java.lang.String BASE_PATH
public static final java.lang.String OPTION_PROJECT
BASE_PATH.
The value of this constant is "project".protected java.util.List<picocli.codegen.aot.graalvm.processor.IGenerator> generators
public void init(javax.annotation.processing.ProcessingEnvironment processingEnv)
init in interface javax.annotation.processing.Processorinit in class AbstractCommandSpecProcessorprotected boolean handleCommands(java.util.Map<javax.lang.model.element.Element,picocli.CommandLine.Model.CommandSpec> commands,
java.util.Set<? extends javax.lang.model.element.TypeElement> annotations,
javax.annotation.processing.RoundEnvironment roundEnv)
AbstractCommandSpecProcessorCommandSpec command model objects that were found during compilation.handleCommands in class AbstractCommandSpecProcessorcommands - a map of annotated elements to their associated CommandSpec.
Note that the key set may contain classes that do not have a @Command
annotation but were added to the map because the class has fields
annotated with Option or @Parameters.annotations - the annotation types requested to be processedroundEnv - environment for information about the current and prior roundtrue is returned, the annotation types are claimed and subsequent
processors will not be asked to process them; if false is returned,
the annotation types are unclaimed and subsequent processors may be asked
to process them. A processor may always return the same boolean value or
may vary the result based on chosen criteria.