Uses of Interface
org.refcodes.cli.Operand
-
-
Uses of Operand in org.refcodes.cli
Subinterfaces of Operand in org.refcodes.cli Modifier and Type Interface Description interface
Option<T>
AnOption
represents a command line option with the according option's value.Classes in org.refcodes.cli that implement Operand Modifier and Type Class Description class
AbstractOperand<T>
TheAbstractOperand
is an abstract implementation of anOperand
providing the boiler plate when implementing theOperand
interface.class
AbstractOption<T>
TheAbstractOption
is an abstract implementation of anOption
providing the boiler plate when implementing theOption
interface.class
ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.class
ArrayOption<T>
Creates an array representation facade for the encapsulatedOption
.class
CharOption
class
ConfigOption
TheConfigOption
represents anOption
holding a value specifying a configuration file or identifying a configuration in general.class
DaemonFlag
A predefined daemonFlag
: A predefinedFlag
gives itsDaemonFlag.SHORT_OPTION
, itsDaemonFlag.LONG_OPTION
as well as itsDaemonFlag.ALIAS
an according semantics regarded by other subsystems.class
DebugFlag
A predefined debugFlag
: A predefinedFlag
gives itsDebugFlag.SHORT_OPTION
, itsDebugFlag.LONG_OPTION
as well as itsDebugFlag.ALIAS
an according semantics regarded by other subsystems.class
DoubleOption
class
EnumOption<T extends Enum<T>>
The Class EnumOption.class
FileOption
class
Flag
TheFlag
class implements theOption
interface for representing either atrue
or afalse
state: When a flag is provided to your command line arguments, then it is considered to betrue
, when it is omitted, then it is considered to befalse
as ofFlag.isEnabled()
.class
FloatOption
class
ForceFlag
A predefined forceFlag
: A predefinedFlag
gives itsForceFlag.SHORT_OPTION
, itsForceFlag.LONG_OPTION
as well as itsForceFlag.ALIAS
an according semantics regarded by other subsystems.class
HelpFlag
A predefined helpFlag
: A predefinedFlag
gives itsHelpFlag.SHORT_OPTION
, itsHelpFlag.LONG_OPTION
as well as itsHelpFlag.ALIAS
an according semantics regarded by other subsystems.class
InitFlag
A predefined initFlag
: A predefinedFlag
gives itsInitFlag.SHORT_OPTION
, itsInitFlag.LONG_OPTION
as well as itsInitFlag.ALIAS
an according semantics regarded by other subsystems.class
IntOption
class
LongOption
class
NoneOperand
TheNoneOperand
represents an empty set of arguments, e.g. no command line argument is being passed.class
Operation
TheOperation
is an argument representing a function or a method ("command") and is either provided or not provided as ofOperation.isEnabled()
.class
QuietFlag
A predefined "be quiet"Flag
: A predefinedFlag
gives itsQuietFlag.SHORT_OPTION
, itsQuietFlag.LONG_OPTION
as well as itsQuietFlag.ALIAS
an according semantics regarded by other subsystems.class
StringOperand
class
StringOption
class
SysInfoFlag
A predefined system informationFlag
: A predefinedFlag
gives itsSysInfoFlag.SHORT_OPTION
, itsSysInfoFlag.LONG_OPTION
as well as itsSysInfoFlag.ALIAS
an according semantics regarded by other subsystems..class
VerboseFlag
A predefined verboseFlag
: A predefinedFlag
gives itsVerboseFlag.SHORT_OPTION
, itsVerboseFlag.LONG_OPTION
as well as itsVerboseFlag.ALIAS
an according semantics regarded by other subsystems.Methods in org.refcodes.cli with type parameters of type Operand Modifier and Type Method Description <T extends Operand<?>>
TAbstractCondition. toOperand(String aAlias, Class<T> aType)
Traverses the hierarchy ofArgsSyntax
tree and returns the (first) operand matching the given alias and type.default <T extends Operand<?>>
TArgsSyntax. toOperand(Class<T> aType)
Traverses the hierarchy ofArgsSyntax
tree and returns the (first) operand matching the given type.<T extends Operand<?>>
TArgsSyntax. toOperand(String aAlias, Class<T> aType)
Traverses the hierarchy ofArgsSyntax
tree and returns the (first) operand matching the given alias and type.Methods in org.refcodes.cli that return Operand Modifier and Type Method Description protected Operand<T>
ArrayOperand. getOperand()
Hook for accessing the encapsulatedOperand
.Operand<?>[]
ExampleUsage. getOperands()
Retrieves the command line arguments required by the example.default Operand<?>
ArgsSyntax. toOperand(String aAlias)
Traverses the hierarchy ofArgsSyntax
tree and returns the (first) operand matching the given alias.Methods in org.refcodes.cli that return types with arguments of type Operand Modifier and Type Method Description List<? extends Operand<?>>
ArgsParser. evalArgs(String[] aArgs)
Evaluates the provided command line arguments and determines the according values by evaluating the rootArgsSyntax
.default List<? extends Operand<?>>
ArgsParser. evalArgs(List<String> aArgs)
Same asArgsParser.evalArgs(String[])
with the difference that the elements representing the arguments are passed as a list instead of an array.List<? extends Operand<?>>
ArgsParserImpl. evalArgs(String[] aArgs)
Evaluates the provided command line arguments and determines the according values by evaluating the rootArgsSyntax
.protected static List<? extends Operand<?>>
ArgsParserImpl. fromArgs(String[] aArgs, char aDelimiter)
Heuristically loads the arguments without any syntax required, e.g.List<Operand<T>>
AbstractOperand. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<Operand<T>>
AbstractOption. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<? extends Operand<?>>
AllCondition. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<? extends Operand<?>>
AndCondition. parseArgs(String[] aArgs, String[] aOptions)
List<? extends Operand<?>>
AnyCondition. parseArgs(String[] aArgs, String[] aOptions)
List<Operand<?>>
ArrayOperand. parseArgs(String[] aArgs, String[] aOperands)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<Operand<Boolean>>
Flag. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<Operand<Boolean>>
NoneOperand. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<Operand<Boolean>>
Operation. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<? extends Operand<?>>
OptionCondition. parseArgs(String[] aArgs, String[] aOptions)
List<? extends Operand<?>>
OrCondition. parseArgs(String[] aArgs, String[] aOptions)
default List<? extends Operand<?>>
Syntaxable. parseArgs(String[] aArgs)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<? extends Operand<?>>
Syntaxable. parseArgs(String[] aArgs, String[] aOptions)
Parses the provided command line arguments and determines the according values by evaluating thisSyntaxable
instance or, in case of being a node in the syntax tree (such as aArgsSyntax
, traversing the childSyntaxable
instances'Syntaxable.parseArgs(String[], String[])
methods.List<? extends Operand<?>>
XorCondition. parseArgs(String[] aArgs, String[] aOptions)
List<Operand<?>>
AbstractCondition. toOperands()
Traverses the hierarchy ofArgsSyntax
s and collects all therein foundOperand
s and sub-types such as theFlag
or theOption
.List<? extends Operand<?>>
ArgsSyntax. toOperands()
Traverses the hierarchy ofArgsSyntax
s and collects all therein foundOperand
s and sub-types such as theFlag
or theOption
.Methods in org.refcodes.cli with parameters of type Operand Modifier and Type Method Description default void
ArgsParser. addExampleUsage(String aDescription, Operand<?>... aOperands)
Adds a usage example by providing a description of the example and the command line arguments required by the example.static <T> ArrayOperand<T>
CliSugar. asArray(Operand<T> aOperand)
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
CliSugar. asArray(Operand<T> aOperand, int aLength)
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
CliSugar. asArray(Operand<T> aOperand, int aMinLength, int aMaxLength)
Creates an array representation facade for the encapsulatedOperand
.int
AbstractOperand. compareTo(Operand<?> obj)
int
ArrayOperand. compareTo(Operand<?> o)
static String
CliUtility. toOptionsSpec(Operand<?> aOperand)
Creates the options specification containing the short option (if any) and the long option ( if any) from the providedOperand
;.static String
CliUtility. toParameterSpec(Operand<?> aOperand)
Creates the parameter specification from the providedOperand
.static String
CliUtility. toParameterSpec(Operand<?> aOperand, int aMin, int aMax)
Creates the parameter specification from the providedOperand
.static String
CliUtility. toSpec(Operand<?> aOperand)
Creates a specification for the givenOperand
consisting of the options specification (if any) as ofCliUtility.toOptionsSpec(Operand)
and the parameter specification (if any) as ofCliUtility.toParameterSpec(Operand)
.default ArgsParser
ArgsParser. withExampleUsage(String aDescription, Operand<?>... aOperands)
Adds a usage example by providing a description of the example and the command line arguments required by the example.Method parameters in org.refcodes.cli with type arguments of type Operand Modifier and Type Method Description static String[]
CliUtility. toDiff(String[] aSet, List<? extends Operand<?>> aSubset)
Constructors in org.refcodes.cli with parameters of type Operand Constructor Description ArrayOperand(Operand<T> aOperand)
Constructs theArrayOperand
by encapsulating the givenOperand
and providing its definition as array definition to the CLI.ArrayOperand(Operand<T> aOperand, int aLength)
Constructs theArrayOperand
by encapsulating the givenOperand
and providing its definition as array definition to the CLI.ArrayOperand(Operand<T> aOperand, int aMinLength, int aMaxLength)
Constructs theArrayOperand
by encapsulating the givenOperand
and providing its definition as array definition to the CLI.ExampleUsage(String aDescription, Operand<?>... aOperands)
Constructs an example usage.
-