@Retention(value=RUNTIME) @Target(value={FIELD,METHOD}) public static @interface CommandLine.Spec
@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
}
}
| Modifier and Type | Optional Element and Description |
|---|---|
CommandLine.Spec.Target |
value
Whether to inject the
CommandSpec of this command (the default) or the CommandSpec
of the "mixee" command that receives the options and other command elements defined here. |
public abstract CommandLine.Spec.Target value
CommandSpec of this command (the default) or the CommandSpec
of the "mixee" command that receives the options and other command elements defined here.CommandLine.Mixin