From f10f5f9e2c385bb998f273d4446ea6a60d5ca0d7 Mon Sep 17 00:00:00 2001 From: Kurt Alfred Kluever Date: Tue, 17 Sep 2024 07:56:20 -0700 Subject: [PATCH] Internal change PiperOrigin-RevId: 675567286 --- docs/inlineme.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/inlineme.md b/docs/inlineme.md index 36a6d2cf800..e5419fe6ae9 100644 --- a/docs/inlineme.md +++ b/docs/inlineme.md @@ -38,6 +38,25 @@ Users who call the method tagged with `@InlineMe` (e.g., `myClass.setDeadline(3000)`) will be migrated to the new method: `myClass.setDeadline(Duration.ofMillis(3000))` +## `-parameters` flag is required for use! + +InlineMe requires the use of the `-parameters` flag because it relies on +parameter name information at runtime --- see +[JEP 118](https://openjdk.org/jeps/118). + +Maven users should add the `true` option to their +`maven-compiler-plugin`. + +Gradle +[does not currently enable this flag by default](https://github.com/gradle/gradle/issues/14781), +so users should add the following to their `build.gradle`: + +``` +tasks.withType(JavaCompile) { + options.compilerArgs << '-parameters' +} +``` + ## Example Usage