From 1f26852fba032c2e908afe8c019815211fd4c185 Mon Sep 17 00:00:00 2001 From: Andreas Deininger Date: Sat, 26 Nov 2022 19:27:43 +0100 Subject: [PATCH] Documentation improvements * fix anchor links in various links to api docs * change links to GraalVM docu to latest version * bump gradle to latest version 7.6 --- ...apps-in-java-with-graalvm-and-picocli.adoc | 10 +++--- docs/index.adoc | 32 +++++++++---------- docs/picocli-on-graalvm.adoc | 2 +- docs/picocli-programmatic-api.adoc | 4 +-- ...icocli-2.0-groovy-scripts-on-steroids.adoc | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- picocli-codegen/README.adoc | 14 ++++---- .../graalvm/DynamicProxyConfigGenerator.java | 10 +++--- .../graalvm/ReflectionConfigGenerator.java | 10 +++--- .../aot/graalvm/ResourceConfigGenerator.java | 10 +++--- 10 files changed, 48 insertions(+), 48 deletions(-) diff --git a/docs/build-great-native-cli-apps-in-java-with-graalvm-and-picocli.adoc b/docs/build-great-native-cli-apps-in-java-with-graalvm-and-picocli.adoc index 9b8c9bcf4..3e55c1297 100644 --- a/docs/build-great-native-cli-apps-in-java-with-graalvm-and-picocli.adoc +++ b/docs/build-great-native-cli-apps-in-java-with-graalvm-and-picocli.adoc @@ -55,12 +55,12 @@ Substrate VM is the name for the runtime components (like the deoptimizer, garba === Native Image Limitations To keep the implementation small and concise, and also to allow aggressive ahead-of-time optimizations, Native Image does not support all features of Java. -The full set of https://www.graalvm.org/reference-manual/native-image/Limitations/[limitations] is documented in the GraalVM reference manual. +The https://www.graalvm.org/latest/reference-manual/native-image/metadata/Compatibility/#features-that-may-operate-differently-in-a-native-image[features] that may operate differently are documented in the GraalVM reference manual. Two limitations are of particular interest: -* https://www.graalvm.org/reference-manual/native-image/Limitations/#reflection[reflection] -* https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] +* https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection] +* https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] Basically, to create a self-contained binary, the native image compiler needs to know up-front all the classes of your application, their dependencies, and the resources they use. Reflection and resource bundles often require configuration. We will see an example of this later on. @@ -198,7 +198,7 @@ Next, let’s take a look at turning it into a native executable. === Reflection Configuration -We mentioned earlier that the native image compiler has some limitations: reflection is supported but https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[requires configuration]. +We mentioned earlier that the native image compiler has some limitations: reflection is supported but https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[requires configuration]. This impacts picocli-based applications: at runtime, picocli uses reflection to discover any `@Command`-annotated subcommands, and the `@Option` and `@Parameters`-annotated command options and positional parameters. @@ -239,7 +239,7 @@ This quickly becomes quite cumbersome for utilities with many options, but fortu The `picocli-codegen` module includes an annotation processor that can build a model from the picocli annotations at compile time rather than at runtime. The annotation processor generates Graal configuration files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. -This includes configuration files for https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. +This includes configuration files for https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. By embedding these configuration files, your jar is instantly Graal-enabled. In most cases no further configuration is needed when generating a native image. diff --git a/docs/index.adoc b/docs/index.adoc index 5f921d50f..5ec41a649 100644 --- a/docs/index.adoc +++ b/docs/index.adoc @@ -302,9 +302,9 @@ The `picocli-codegen` module includes an annotation processor that can build a m Enabling this annotation processor in your project is optional, but strongly recommended. Use this if you’re interested in: * **Compile time error checking**. The annotation processor shows errors for invalid annotations and attributes immediately when you compile, instead of during testing at runtime, resulting in shorter feedback cycles. -* **<>**. The annotation processor generates and updates https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[GraalVM configuration] files under +* **<>**. The annotation processor generates and updates https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[GraalVM configuration] files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. -This includes configuration files for https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. +This includes configuration files for https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. By embedding these configuration files, your jar is instantly Graal-enabled. In most cases no further configuration is needed when generating a native image. @@ -1857,7 +1857,7 @@ Enum value matching is case-sensitive by default, but as of picocli 3.4 this can == Default Values It is possible to define a default value for an option or positional parameter, that is assigned when the user did not specify this option or positional parameter on the command line. -Configuring a default value guarantees that the `@Option` or `@Parameters`-annotated field will get set, annotated method will get called, and, when using the programmatic API, that the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#setValue-T-[`ArgSpec.setValue`] method will get invoked, even when the option or positional parameter was not specified on the command line. +Configuring a default value guarantees that the `@Option` or `@Parameters`-annotated field will get set, annotated method will get called, and, when using the programmatic API, that the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#setValue(T)[`ArgSpec.setValue`] method will get invoked, even when the option or positional parameter was not specified on the command line. [#defaultValue-annotation] === `defaultValue` Annotation @@ -2053,11 +2053,11 @@ cmd.execute(*args) ==== PropertiesDefaultProvider Format The `PropertiesDefaultProvider` expects the properties file to be in the standard java `.properties` https://en.wikipedia.org/wiki/.properties[format]. -For options, the key is either the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Option.html#descriptionKey--[descriptionKey], -or the option's https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.OptionSpec.html#longestName--[longest name], without the prefix. So, for an option `--verbose`, the key would be `verbose`, and for an option `/F`, the key would be `F`. +For options, the key is either the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Option.html#descriptionKey()[descriptionKey], +or the option's https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.OptionSpec.html#longestName()[longest name], without the prefix. So, for an option `--verbose`, the key would be `verbose`, and for an option `/F`, the key would be `F`. -For positional parameters, the key is either the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#descriptionKey--[descriptionKey], -or the positional parameter's https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#paramLabel--[param label]. +For positional parameters, the key is either the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#descriptionKey()[descriptionKey], +or the positional parameter's https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#paramLabel()[param label]. End users may not know what the `descriptionKey` of your options and positional parameters are, so be sure to document that with your application. @@ -4114,7 +4114,7 @@ When the user specified invalid input, the parser throws a `ParameterException`. In the `execute` method, such exceptions are caught and passed to the `IParameterExceptionHandler`. The default parameter exception handler prints an error message describing the problem, -followed by either https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.UnmatchedArgumentException.html#printSuggestions-picocli.CommandLine.ParameterException-java.io.PrintWriter-[suggested alternatives] +followed by either https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.UnmatchedArgumentException.html#printSuggestions(picocli.CommandLine.ParameterException,java.io.PrintWriter)[suggested alternatives] for mistyped options, or the full usage help message of the problematic command. Finally, the handler returns an <>. This is sufficient for most applications. @@ -5289,7 +5289,7 @@ This allows you to control: * the negative form recognized by the parser while parsing the command line * the documentation string showing both the positive and the negative form in the usage help message -By default, a set of https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.RegexTransformer.html#createDefault--[regular expressions] is used to control the above. +By default, a set of https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.RegexTransformer.html#createDefault()[regular expressions] is used to control the above. Use `CommandLine::setNegatableOptionTransformer` to replace the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.INegatableOptionTransformer[`INegatableOptionTransformer`] with a custom version. See the JavaDoc for details. @@ -8852,7 +8852,7 @@ The default link:#_executing_commands_with_subcommands[`IExecutionStrategy`] (`p toplevelcmd subcmd-A subcmd-B subsub-B1 subsub-B2 ---- -is invoked, only the last two sub-subcommands `subsub-B1` and `subsub-B2` (who both have parent command `subcmd-B`) are executed by default. You can https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#setExecutionStrategy-picocli.CommandLine.IExecutionStrategy-[set] a different https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.IExecutionStrategy.html[execution strategy] if this does not meet your needs. +is invoked, only the last two sub-subcommands `subsub-B1` and `subsub-B2` (who both have parent command `subcmd-B`) are executed by default. You can https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#setExecutionStrategy(picocli.CommandLine.IExecutionStrategy)[set] a different https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.IExecutionStrategy.html[execution strategy] if this does not meet your needs. === Usage Help for Subcommands @@ -9995,7 +9995,7 @@ The matching entry in the resource bundle could look like this: xoption = This is the description for the -x option. ---- -When the `descriptionKey` is omitted, the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Option.html#descriptionKey--[fallback for options] is any option name without the leading dashes, for example: +When the `descriptionKey` is omitted, the https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Option.html#descriptionKey()[fallback for options] is any option name without the leading dashes, for example: .Java [source,java,role="primary"] @@ -10015,7 +10015,7 @@ verbose = Show more detail during execution. \ May be specified multiple times for increasing verbosity. ---- -For https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#descriptionKey--[positional parameters] the fallback key is the `paramLabel + [ index ]`, for example: +For https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Parameters.html#descriptionKey()[positional parameters] the fallback key is the `paramLabel + [ index ]`, for example: .Java [source,java,role="primary"] @@ -12451,7 +12451,7 @@ assertEquals("expectedValue1", app.state1) assertEquals("expectedValue2", app.state2) ---- -This assumes that the application uses the `PrintWriter` provided by https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#getOut--[`CommandLine.getOut`] or https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#getErr--[`CommandLine.getErr`]. +This assumes that the application uses the `PrintWriter` provided by https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#getOut()[`CommandLine.getOut`] or https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.html#getErr()[`CommandLine.getErr`]. Applications can get these writers via the <<#spec-annotation,`@Spec`>> annotation: .Java @@ -12927,8 +12927,8 @@ ahead-of-time compile Java code to a standalone executable, called a native imag The resulting executable includes the application, the libraries, and the JDK and does not require a separate Java VM to be installed. The generated native image has faster startup time and lower runtime memory overhead compared to a Java VM. -GraalVM native images have some limitations and require some extra https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[configuration] -to be able to use features like https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] (including resource bundles) and https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. +GraalVM native images have some limitations and require some extra https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[configuration] +to be able to use features like https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] (including resource bundles) and https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. ==== How do I Create a Native Image for my Application? The `picocli-codegen` module contains an annotation processor that generates the necessary configuration files @@ -12937,7 +12937,7 @@ to be included in the application jar. The <> section of t file. By embedding these configuration files, your jar is instantly Graal-enabled: the -https://www.graalvm.org/22.2/reference-manual/native-image/#install-native-image[`native-image` tool] +https://www.graalvm.org/latest/reference-manual/native-image/#install-native-image[`native-image` tool] used to generate the native executable is able to get the configuration from the jar. In most cases no further configuration is needed when generating a native image. diff --git a/docs/picocli-on-graalvm.adoc b/docs/picocli-on-graalvm.adoc index 30adbac1e..2345426cb 100644 --- a/docs/picocli-on-graalvm.adoc +++ b/docs/picocli-on-graalvm.adoc @@ -72,7 +72,7 @@ The generated `reflect.json` files looks something like this: TIP: If necessary, it is possible to exclude classes with system property `picocli.codegen.excludes`, which accepts a comma-separated list of regular expressions of the fully qualified class names that should not be included in the resulting JSON String. === Compiling a Native Image -This assumes you have GraalVM installed, with prerequisites. From https://www.graalvm.org/22.2/reference-manual/native-image/[the site]: +This assumes you have GraalVM installed, with prerequisites. From https://www.graalvm.org/latest/reference-manual/native-image/[the site]: [quote] ____ diff --git a/docs/picocli-programmatic-api.adoc b/docs/picocli-programmatic-api.adoc index aa9855d1a..bf4555c72 100644 --- a/docs/picocli-programmatic-api.adoc +++ b/docs/picocli-programmatic-api.adoc @@ -195,8 +195,8 @@ the parser will create a https://picocli.info/#_strongly_typed_everything[strong that was matched on the command line. Picocli stores this value in the `ArgSpec` by using its `IGetter` or `ISetter`. Most applications don't need to know the details of getter and setter bindings, and can just call -https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#getValue--[getValue] or -https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#setValue-T-[setValue]. +https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#getValue()[getValue] or +https://picocli.info/apidocs-all/info.picocli/picocli/CommandLine.Model.ArgSpec.html#setValue(T)[setValue]. The below may be of interest for applications or libraries that use picocli to design a domain-specific language, or implement some other dynamic behaviour. Picocli internally uses bindings to allow `@Option` and `@Parameters`-annotated fields and setter methods on implementation classes, and annotated getter methods on interfaces. diff --git a/docs/zh/picocli-2.0-groovy-scripts-on-steroids.adoc b/docs/zh/picocli-2.0-groovy-scripts-on-steroids.adoc index 9594d4da9..1db061c97 100644 --- a/docs/zh/picocli-2.0-groovy-scripts-on-steroids.adoc +++ b/docs/zh/picocli-2.0-groovy-scripts-on-steroids.adoc @@ -130,7 +130,7 @@ image:AllYourBase.png[Alt="你们所有的基地都属于我们",width='35%'] * 否则,执行脚本主体。 -此行为可以自定义,有关更多详情,请参见 http://picocli.info/apidocs-all/info.picocli.groovy/picocli/groovy/PicocliBaseScript.html#run--[Picocli基础脚本文档]。 +此行为可以自定义,有关更多详情,请参见 http://picocli.info/apidocs-all/info.picocli.groovy/picocli/groovy/PicocliBaseScript.html#run()[Picocli基础脚本文档]。 除了修改脚本基类之外, `@PicocliScript` 注释还允许Groovy脚本直接使用 `@Command` 注释,而无需引入助手类。 Picocli解析器将在含有 `@Option` 和 `@Parameters` 注释字段的类中寻找此注释。 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb8790..070cb702f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/picocli-codegen/README.adoc b/picocli-codegen/README.adoc index f637ae1cd..5044063b5 100644 --- a/picocli-codegen/README.adoc +++ b/picocli-codegen/README.adoc @@ -27,7 +27,7 @@ If a tool does not have an annotation processor wrapper (yet), it can be invoked As of picocli version 4.2, this module has three major use cases: * **Compile time error checking**. The annotation processor shows errors for invalid annotations and attributes immediately when you compile, instead of during testing at runtime, resulting in shorter feedback cycles. -* **GraalVm native images**. To create a GraalVM native image for a picocli application, https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[configuration] is needed. The `ReflectionConfigGenerator`, `ResourceConfigGenerator` and `DynamicProxyGenerator` tools can generate `reflect-config.json`, `resource-config.json` and `proxy-config.json` configuration files for https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies], respectively. +* **GraalVm native images**. To create a GraalVM native image for a picocli application, https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[configuration] is needed. The `ReflectionConfigGenerator`, `ResourceConfigGenerator` and `DynamicProxyGenerator` tools can generate `reflect-config.json`, `resource-config.json` and `proxy-config.json` configuration files for https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies], respectively. + The annotation processor embeds these three tools and generates the configuration files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. By embedding these configuration files, your jar is instantly GraalVM-enabled. @@ -43,10 +43,10 @@ To build a GraalVM native image for a picocli-based application, configuration f The `picocli-codegen` module has tools that generate these configuration files for a picocli-based application. The annotation processor in the `picocli-codegen` jar wraps these tools so they are executed automatically during compilation. -The annotation processor generates and updates https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[GraalVM configuration] +The annotation processor generates and updates https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[GraalVM configuration] files under `META-INF/native-image/picocli-generated/$project` during compilation, to be included in the application jar. -This includes configuration files for https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. +This includes configuration files for https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[reflection], https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[resources] and https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[dynamic proxies]. By embedding these configuration files, your jar is instantly GraalVM-enabled. In most cases no further configuration is needed when generating a native image. @@ -285,11 +285,11 @@ This directory (or any of its subdirectories) is searched for files with the nam which are then automatically included in the build. Not all of those files must be present. When multiple files with the same name are found, all of them are included. -See also the SubstrateVM https://www.graalvm.org/22.2/reference-manual/native-image/overview/BuildConfiguration/[configuration documentation]. +See also the SubstrateVM https://www.graalvm.org/latest/reference-manual/native-image/overview/BuildConfiguration/[configuration documentation]. === ReflectionConfigGenerator -GraalVM has https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Reflection/[limited support for Java reflection] +GraalVM has https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/[limited support for Java reflection] and it needs to know ahead of time the reflectively accessed program elements. `ReflectionConfigGenerator` generates a JSON String with the program elements that will be accessed reflectively in a picocli-based application, in order to compile this application ahead-of-time into a native executable with GraalVM. @@ -397,7 +397,7 @@ assemble.dependsOn generateGraalReflectionConfig === ResourceConfigGenerator The GraalVM native-image builder by default will not integrate any of the -https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/[classpath resources] into the image it creates. +https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/[classpath resources] into the image it creates. `ResourceConfigGenerator` generates a JSON String with the resource bundles and other classpath resources that should be included in the Substrate VM native image. @@ -505,7 +505,7 @@ assemble.dependsOn generateGraalResourceConfig === DynamicProxyConfigGenerator Substrate VM doesn't provide machinery for generating and interpreting bytecodes at run time. Therefore all dynamic proxy classes -https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/[need to be generated] at native image build time. +https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/[need to be generated] at native image build time. `DynamicProxyConfigGenerator` generates a JSON String with the fully qualified interface names for which dynamic proxy classes should be generated at native image build time. diff --git a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/DynamicProxyConfigGenerator.java b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/DynamicProxyConfigGenerator.java index 8de10fd1b..681353f59 100644 --- a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/DynamicProxyConfigGenerator.java +++ b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/DynamicProxyConfigGenerator.java @@ -22,15 +22,15 @@ *

* Substrate VM doesn't provide machinery for generating and interpreting bytecodes at run time. * Therefore all dynamic proxy classes - * need to be generated + * need to be generated * at native image build time. *

* The output of {@code DynamicProxyConfigGenerator} is intended to be passed to the {@code -H:DynamicProxyConfigurationFiles=/path/to/proxy-config.json} - * option of the {@code native-image} GraalVM utility. + * option of the {@code native-image} GraalVM utility. * This allows picocli-based native image applications that use {@code @Command}-annotated interfaces with * {@code @Option} and {@code @Parameters}-annotated methods to define options and positional parameters. *

- * Alternatively, the generated configuration + * Alternatively, the generated configuration * files can be supplied to the {@code native-image} tool by placing them in a * {@code META-INF/native-image/} directory on the class path, for example, in a JAR file used in the image build. * This directory (or any of its subdirectories) is searched for files with the names {@code jni-config.json}, @@ -47,7 +47,7 @@ public class DynamicProxyConfigGenerator { description = {"Generates a JSON file with the interface names to generate dynamic proxy classes for in the native image.", "The generated JSON file can be passed to the `-H:DynamicProxyConfigurationFiles=/path/to/proxy-config.json` " + "option of the `native-image` GraalVM utility.", - "See https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/DynamicProxy/"}, + "See https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/DynamicProxy/"}, exitCodeListHeading = "%nExit Codes (if enabled with `--exit`)%n", exitCodeList = { "0:Successful program execution.", @@ -110,7 +110,7 @@ public static void main(String... args) { * * @param specs one or more {@code CommandSpec} objects to inspect for dynamic proxies * @param interfaceClasses other (non-{@code @Command}) fully qualified interface names to generate dynamic proxy classes for - * @return a JSON String in the format + * @return a JSON String in the format * required by the {@code -H:DynamicProxyConfigurationFiles=/path/to/proxy-config.json} option of the GraalVM {@code native-image} utility. */ public static String generateProxyConfig(CommandSpec[] specs, String[] interfaceClasses) { diff --git a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ReflectionConfigGenerator.java b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ReflectionConfigGenerator.java index f846fc1e6..22e2b73da 100644 --- a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ReflectionConfigGenerator.java +++ b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ReflectionConfigGenerator.java @@ -47,14 +47,14 @@ * reflectively in a picocli-based application, in order to compile this application ahead-of-time into a native * executable with GraalVM. *

- * GraalVM has limited support for Java + * GraalVM has limited support for Java * reflection and it needs to know ahead of time the reflectively accessed program elements. *

* The output of {@code ReflectionConfigGenerator} is intended to be passed to the {@code -H:ReflectionConfigurationFiles=/path/to/reflect-config.json} - * option of the {@code native-image} GraalVM utility. + * option of the {@code native-image} GraalVM utility. * This allows picocli-based applications to be compiled to a native image. *

- * Alternatively, the generated configuration + * Alternatively, the generated configuration * files can be supplied to the {@code native-image} tool by placing them in a * {@code META-INF/native-image/} directory on the class path, for example, in a JAR file used in the image build. * This directory (or any of its subdirectories) is searched for files with the names {@code jni-config.json}, @@ -84,7 +84,7 @@ public class ReflectionConfigGenerator { "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/22.2/reference-manual/native-image/dynamic-features/Reflection/"}, + "See https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Reflection/"}, exitCodeListHeading = "%nExit Codes (if enabled with `--exit`)%n", exitCodeList = { "0:Successful program execution.", @@ -143,7 +143,7 @@ public static void main(String... args) { * {@code CommandSpec} objects. * * @param specs one or more {@code CommandSpec} objects to inspect - * @return a JSON String in the format + * @return a JSON String in the format * required by the {@code -H:ReflectionConfigurationFiles=/path/to/reflect-config.json} option of the GraalVM {@code native-image} utility. * @throws NoSuchFieldException if a problem occurs while processing the specified specs * @throws IllegalAccessException if a problem occurs while processing the specified specs diff --git a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ResourceConfigGenerator.java b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ResourceConfigGenerator.java index e21ac4b02..0c4d9abcb 100644 --- a/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ResourceConfigGenerator.java +++ b/picocli-codegen/src/main/java/picocli/codegen/aot/graalvm/ResourceConfigGenerator.java @@ -20,13 +20,13 @@ * that should be included in the Substrate VM native image. *

* The GraalVM native-image builder by default will not integrate any of the - * classpath resources into the image it creates. + * classpath resources into the image it creates. *

* The output of {@code ResourceConfigGenerator} is intended to be passed to the {@code -H:ResourceConfigurationFiles=/path/to/resource-config.json} - * option of the {@code native-image} GraalVM utility. + * option of the {@code native-image} GraalVM utility. * This allows picocli-based native image applications to access these resources. *

- * Alternatively, the generated configuration + * Alternatively, the generated configuration * files can be supplied to the {@code native-image} tool by placing them in a * {@code META-INF/native-image/} directory on the class path, for example, in a JAR file used in the image build. * This directory (or any of its subdirectories) is searched for files with the names {@code jni-config.json}, @@ -43,7 +43,7 @@ public class ResourceConfigGenerator { description = {"Generates a JSON file with the resources and resource bundles to include in the native image.", "The generated JSON file can be passed to the `-H:ResourceConfigurationFiles=/path/to/resource-config.json` " + "option of the `native-image` GraalVM utility.", - "See https://www.graalvm.org/22.2/reference-manual/native-image/dynamic-features/Resources/"}, + "See https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/Resources/"}, exitCodeListHeading = "%nExit Codes (if enabled with `--exit`)%n", exitCodeList = { "0:Successful program execution.", @@ -111,7 +111,7 @@ public static void main(String... args) { * @param specs one or more {@code CommandSpec} objects to inspect for resource bundles * @param bundles base names of additional resource bundles to be included in the image * @param resourceRegex one or more Java regular expressions that match resource(s) to be included in the image - * @return a JSON String in the format + * @return a JSON String in the format * required by the {@code -H:ResourceConfigurationFiles=/path/to/resource-config.json} option of the GraalVM {@code native-image} utility. */ public static String generateResourceConfig(CommandSpec[] specs, String[] bundles, String[] resourceRegex) {