Synopsis

gen-reflect-config [-hV] [--[no-]exit] [-c=<factoryClass>] [-o=<outputFile>] [@<filename>…​] <classes>…​

Description

Generates a JSON file with the program elements that will be accessed reflectively for the specified @Command classes. The generated JSON file can be passed to the -H:ReflectionConfigurationFiles=/path/to/reflect-config.json option of the native-image GraalVM utility. See https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/

Options

-c, --factory=<factoryClass>

Optionally specify the fully qualified class name of the custom factory to use to instantiate the command class. When omitted, the default picocli factory is used.

-o, --output=<outputFile>

Output file to write the configuration to. If not specified, the configuration is written to the standard output stream.

--[no-]exit

Specify --exit if you want the application to call System.exit when finished. By default, System.exit is not called.

-h, --help

Show this help message and exit.

-V, --version

Print version information and exit.

Arguments

[@<filename>…​]

One or more argument files containing options.

<classes>…​

One or more classes to generate a GraalVM ReflectionConfiguration for.

Exit Codes (if enabled with --exit)

0

Successful program execution.

1

A runtime exception occurred while generating man pages.

2

Usage error: user input for the command was incorrect, e.g., the wrong number of arguments, a bad flag, a bad syntax in a parameter, etc.

Example

java -cp "myapp.jar;picocli-4.7.5.jar;picocli-codegen-4.7.5.jar" picocli.codegen.aot.graalvm.ReflectionConfigGenerator my.pkg.MyClass