Package picocli
Annotation Type CommandLine.Spec
-
@Retention(RUNTIME) @Target({FIELD,METHOD}) public static @interface CommandLine.SpecFields annotated with@Specwill be initialized with theCommandSpecfor the command the field is part of. Example usage:class InjectSpecExample implements Runnable { @Spec CommandSpec commandSpec; //... public void run() { // do something with the injected objects } }- Since:
- 3.2
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description CommandLine.Spec.TargetvalueWhether to inject theCommandSpecof this command (the default) or theCommandSpecof the "mixee" command that receives the options and other command elements defined here.
-
-
-
Element Detail
-
value
CommandLine.Spec.Target value
Whether to inject theCommandSpecof this command (the default) or theCommandSpecof the "mixee" command that receives the options and other command elements defined here.- Since:
- 4.3.0
- See Also:
CommandLine.Mixin
- Default:
- picocli.CommandLine.Spec.Target.SELF
-
-