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 enumIdentifies what kind ofCommandSpecshould be injected. -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionWhether to inject theCommandSpecof this command (the default) or theCommandSpecof the "mixee" command that receives the options and other command elements defined here.
-
Element Details
-
value
CommandLine.Spec.Target valueWhether 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:
- Default:
SELF
-