Package picocli
Annotation Type CommandLine.Spec
- Enclosing class:
CommandLine
Fields annotated with
@Spec
will be initialized with the CommandSpec
for 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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Identifies what kind ofCommandSpec
should be injected. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionWhether to inject theCommandSpec
of this command (the default) or theCommandSpec
of the "mixee" command that receives the options and other command elements defined here.
-
Element Details
-
value
CommandLine.Spec.Target valueWhether to inject theCommandSpec
of this command (the default) or theCommandSpec
of the "mixee" command that receives the options and other command elements defined here.- Since:
- 4.3.0
- See Also:
- Default:
SELF
-