Uses of Interface
org.refcodes.cli.Operand
-
Uses of Operand in org.refcodes.cli
Modifier and TypeInterfaceDescriptioninterface
Option<T>
AnOption
represents a command line option with the according option's value.Modifier and TypeClassDescriptionclass
TheAbstractOperand
is an abstract implementation of anOperand
providing the boiler plate when implementing theOperand
interface.class
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
class
A predefined cleanFlag
: A predefinedFlag
gives itsCleanFlag.SHORT_OPTION
, itsCleanFlag.LONG_OPTION
as well as itsCleanFlag.ALIAS
an according semantics regarded by other subsystems.class
TheConfigOption
represents anOption
holding a value specifying a configuration resource (file).class
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
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
class
EnumOption<T extends Enum<T>>
TheEnumOption
represents anOption
of enumeration types.class
class
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
class
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
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
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
class
class
TheNoneOperand
represents an empty set of arguments, e.g. no command line argument is being passed.class
TheOperation
is an argument representing a function or a method ("command") and is either provided or not provided as ofOperation.isEnabled()
.class
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
class
class
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
A predefined verboseFlag
: A predefinedFlag
gives itsVerboseFlag.SHORT_OPTION
, itsVerboseFlag.LONG_OPTION
as well as itsVerboseFlag.ALIAS
an according semantics regarded by other subsystems.Modifier and TypeMethodDescription<T extends Operand<?>>
TTraverses the hierarchy ofCondition
tree and returns the (first) operand matching the given alias and type.default <T extends Operand<?>>
TTraverses the hierarchy ofCondition
tree and returns the (first) operand matching the given type.<T extends Operand<?>>
TTraverses the hierarchy ofCondition
tree and returns the (first) operand matching the given alias and type.Modifier and TypeMethodDescriptionArrayOperand.getOperand()
Hook for accessing the encapsulatedOperand
.Operand<?>[]
Example.getOperands()
Retrieves the command line arguments required by the example.default Operand<?>
Traverses the hierarchy ofCondition
tree and returns the (first) operand matching the given alias.Modifier and TypeMethodDescriptionEvaluates the provided command line arguments and determines the according values by evaluating the rootCondition
.Evaluates the provided command line arguments, filtering (excluding) the arguments matching the providedPattern
.ArgsParser.evalArgs
(String[] aArgs, ArgsFilter aArgsFilter) Evaluates the provided command line arguments, filtering (excluding) the arguments matching the providedArgsFilter
.Same asArgsParser.evalArgs(String[])
with the difference that the elements representing the arguments are passed as a list instead of an array.Evaluates the provided command line arguments, filtering (excluding) the arguments matching the providedPattern
.ArgsParser.evalArgs
(List<String> aArgs, ArgsFilter aArgsFilter) Evaluates the provided command line arguments, filtering (excluding) the arguments matching the providedArgsFilter
.Evaluates the provided command line arguments and determines the according values by evaluating the rootCondition
.Heuristically loads the arguments without any syntax required, e.g.AbstractOperand.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.AbstractOption.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.AllCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.AndCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.AnyCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.ArrayOperand.parseArgs
(String[] aArgs, String[] aOperands, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.Constituent.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.Constituent.parseArgs
(String[] aArgs, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.Flag.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.NoneOperand.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.Operation.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.OrCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.XorCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisConstituent
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childConstituent
instances'Constituent.parseArgs(String[], String[], CliContext)
methods.AbstractCondition.toOperands()
Condition.toOperands()
Modifier and TypeMethodDescriptiondefault void
ArgsParser.addExample
(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>
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.static <T> ArrayOperand<T>
Creates an array representation facade for the encapsulatedOperand
.int
int
static Example
CliContext.toArgumentSpec
(Operand<?> aOperand) Creates the argument specification from the providedOperand
.CliContext.toArgumentSpec
(Operand<?> aOperand, int aMin, int aMax) Creates the argument specification from the providedOperand
.Creates a specification for the givenOperand
consisting of theOption
constituent's specification (if any) as ofCliContext.toOption(Option)
and the argument specification (if any) as ofCliContext.toArgumentSpec(Operand)
.default ArgsParser
ArgsParser.withExample
(String aDescription, Operand<?>... aOperands) Adds a usage example by providing a description of the example and the command line arguments required by the example.Modifier and TypeMethodDescriptionstatic String[]
CliUtility.toArgsDiff
(String[] aArgs, List<? extends Operand<?>> aArgsSubset) Creates the difference between the provided set and the providedList
s therein found argument arrays subset (as oftoParsedArgs()
).ModifierConstructorDescriptionArrayOperand
(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.Constructs an example usage.