- Type Parameters:
T- the generic type
- All Superinterfaces:
org.refcodes.mixin.AliasAccessor,ArgsAccessor,org.refcodes.mixin.Clonable,Cloneable,Comparable<Operand<?>>,Constituent,org.refcodes.mixin.DescriptionAccessor,Operand<T>,org.refcodes.mixin.Resetable,org.refcodes.mixin.Schemable<CliSchema>,Synopsisable,org.refcodes.mixin.TypeAccessor<T>,org.refcodes.mixin.ValueAccessor<T>
- All Known Implementing Classes:
AbstractOption,ArrayOption,CharOption,CleanFlag,ConfigOption,DaemonFlag,DebugFlag,DoubleOption,EnumOption,FileOption,Flag,FloatOption,ForceFlag,HelpFlag,InitFlag,IntOption,LongOption,QuietFlag,StringOption,SysInfoFlag,VerboseFlag
An
Option represents a command line option with the according
option's value. An Option can be seen as a key/value(s) pair defined
in the command line arguments parsed via the
Constituent.parseArgs(String[], String[], CliContext) method.
An Option has a state which changes with each invocation of the
Constituent.parseArgs(String[], String[], CliContext) method.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.refcodes.mixin.AliasAccessor
org.refcodes.mixin.AliasAccessor.AliasBuilder<B extends org.refcodes.mixin.AliasAccessor.AliasBuilder<B>>, org.refcodes.mixin.AliasAccessor.AliasMutator, org.refcodes.mixin.AliasAccessor.AliasPropertyNested classes/interfaces inherited from interface org.refcodes.cli.ArgsAccessor
ArgsAccessor.ArgsMutator, ArgsAccessor.ArgsPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.DescriptionAccessor
org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B extends org.refcodes.mixin.DescriptionAccessor.DescriptionBuilder<B>>, org.refcodes.mixin.DescriptionAccessor.DescriptionMutator, org.refcodes.mixin.DescriptionAccessor.DescriptionPropertyNested classes/interfaces inherited from interface org.refcodes.mixin.TypeAccessor
org.refcodes.mixin.TypeAccessor.TypeBuilder<T extends Object,B extends org.refcodes.mixin.TypeAccessor.TypeBuilder<T, B>>, org.refcodes.mixin.TypeAccessor.TypeMutator<T extends Object>, org.refcodes.mixin.TypeAccessor.TypeProperty<T extends Object> Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor
org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends Object,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V, B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends Object> -
Method Summary
Methods inherited from interface org.refcodes.mixin.Clonable
cloneMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.refcodes.cli.Constituent
parseArgs, parseArgs, toSynopsis, toSyntax, toSyntax, toSyntax, toSyntax, toSyntaxMethods inherited from interface org.refcodes.mixin.DescriptionAccessor
getDescriptionMethods inherited from interface org.refcodes.cli.Operand
getAlias, getValue, hasValue, toParsedArgs, toSpec, toValueMethods inherited from interface org.refcodes.mixin.Resetable
resetMethods inherited from interface org.refcodes.mixin.Schemable
toSchemaMethods inherited from interface org.refcodes.cli.Synopsisable
toSynopsis, toSynopsis, toSynopsis, toSynopsisMethods inherited from interface org.refcodes.mixin.TypeAccessor
getTypeMethods inherited from interface org.refcodes.mixin.ValueAccessor
getValueOr
-
Method Details
-
getShortOption
Character getShortOption()Returns the short-option representing anOptioninstance. A short option usually is being prefixed with a single hyphen-minus "-" as defined inArgsPrefix.POSIX_SHORT_OPTION.- Returns:
- The short-option
String.
-
getLongOption
String getLongOption()Returns the long-option representing anOptioninstance. A long option usually is being prefixed with a double hyphen-minus "--" as defined inArgsPrefix.POSIX_LONG_OPTION.- Returns:
- The long-option
String.
-