-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Register classes referenced in Picocli annotations for reflection
Let's do it in a generic way, given there are a lot of them. Fixes #19289
- Loading branch information
Showing
4 changed files
with
52 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
...-tests/picocli-native/src/main/java/io/quarkus/it/picocli/CustomDefaultValueProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.quarkus.it.picocli; | ||
|
||
import picocli.CommandLine.IDefaultValueProvider; | ||
import picocli.CommandLine.Model.ArgSpec; | ||
|
||
public class CustomDefaultValueProvider implements IDefaultValueProvider { | ||
|
||
@Override | ||
public String defaultValue(ArgSpec argSpec) throws Exception { | ||
return "false"; | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...tests/picocli-native/src/main/java/io/quarkus/it/picocli/DefaultValueProviderCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package io.quarkus.it.picocli; | ||
|
||
import picocli.CommandLine; | ||
|
||
@CommandLine.Command(name = "defaultvalueprovider", mixinStandardHelpOptions = true, defaultValueProvider = CustomDefaultValueProvider.class) | ||
public class DefaultValueProviderCommand implements Runnable { | ||
|
||
@Override | ||
public void run() { | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters