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.interface
AnPropertyOption
represents a command line property with the according porperty's key and 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
TheAbstractPropertyOption
is an abstract implementation of aPropertyOption
providing the boiler plate when implementing thePropertyOption
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
class
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
TheConfigProperty
represents anPropertyOption
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
class
EnumOption<T extends Enum<T>>
TheEnumOption
represents anOption
of enumeration types.class
EnumProperty<T extends Enum<T>>
TheEnumProperty
represents anPropertyOption
of enumeration types.class
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
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
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
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 TypeMethodDescriptionOperand<?>[]
Evaluates the provided command line arguments and determines the according values by evaluating the rootCondition
.Operand<?>[]
Evaluates the provided command line arguments and determines the according values by evaluating the rootCondition
.default Operand<?>[]
Evaluates the provided command line arguments as ofParseArgs.evalArgs(String[])
, additionally filtering (excluding) the arguments matching the providedPattern
.default Operand<?>[]
ParseArgs.evalArgs
(String[] aArgs, ArgsFilter aArgsFilter) Evaluates the provided command line arguments as ofParseArgs.evalArgs(String[])
, additionally filtering (excluding) the arguments matching the providedArgsFilter
.default Operand<?>[]
Same asParseArgs.evalArgs(String[])
with the difference that the elements representing the arguments are passed as a list instead of an array.default Operand<?>[]
Evaluates the provided command line arguments as ofParseArgs.evalArgs(String[])
, additionally filtering (excluding) the arguments matching the providedPattern
.default Operand<?>[]
ParseArgs.evalArgs
(List<String> aArgs, ArgsFilter aArgsFilter) Evaluates the provided command line arguments as ofParseArgs.evalArgs(String[])
, additionally filtering (excluding) the arguments matching the providedArgsFilter
.ArrayOperand.getOperand()
Hook for accessing the encapsulatedOperand
.Operand<?>[]
Example.getOperands()
Retrieves the command line arguments required by the example.Operand<?>[]
AbstractOperand.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
AbstractOption.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
AbstractPropertyOption.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
AllCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
AndCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
AnyCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
ArrayOperand.parseArgs
(String[] aArgs, String[] aOperands, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.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 thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
NoneOperand.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.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 thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
OrCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
Term.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliContext) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.default Operand<?>[]
Term.parseArgs
(String[] aArgs, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.Operand<?>[]
XorCondition.parseArgs
(String[] aArgs, String[] aOptions, CliContext aCliCtx) Parses the provided command line arguments and determines the according values by evaluating thisTerm
instance or, in case of being a node in the syntax tree (such as aCondition
, traversing the childTerm
instances'Term.parseArgs(String[], String[], CliContext)
methods.default Operand<?>
Traverses the hierarchy ofCondition
tree and returns the (first) operand matching the given alias.Operand<?>[]
AbstractCondition.toOperands()
Operand<?>[]
Condition.toOperands()
default Operand<?>[]
Condition.toOperands
(String[] aArgs) Modifier and TypeMethodDescriptiondefault void
ParseArgs.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
and its arguments.Creates a specification for the givenOperand
and its arguments.ArgsParser.withAddExample
(String aDescription, Operand<?>... aOperands) Builder method adding an application'sExample
element.ArgsProcessorBuilder.withAddExample
(String aDescription, Operand<?>... aOperands) Builder method adding an application'sExample
element.default ParseArgs
ParseArgs.withAddExample
(String aDescription, Operand<?>... aOperands) Builder method adding an application'sExample
element.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.ModifierConstructorDescriptionAbstractOperand
(Class<T> aType, String aAlias, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anOperand
with the given arguments.AbstractOperand
(org.refcodes.struct.Relation<String, T> aProperty, Class<T> aType, Consumer<? extends Operand<T>> aConsumer) Constructs anOperand
with the given arguments.AbstractOption
(Character aShortOption, String aLongOption, Class<T> aType, String aAlias, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractOption
with the given arguments.protected
AbstractOption
(Character aShortOption, String aLongOption, Class<T> aType, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractOption
with the given arguments.AbstractOption
(String aLongOption, Class<T> aType, String aAlias, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractOption
with the given arguments.AbstractOption
(String aLongOption, Class<T> aType, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractOption
with the given arguments.AbstractOption
(org.refcodes.struct.Relation<String, T> aProperty, Class<T> aType, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractOption
with the given arguments.AbstractPropertyOption
(Character aShortProperty, String aLongProperty, Class<T> aType, String aAlias, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractPropertyOption
with the given arguments.protected
AbstractPropertyOption
(Character aShortProperty, String aLongProperty, Class<T> aType, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractPropertyOption
with the given arguments.AbstractPropertyOption
(String aLongProperty, Class<T> aType, String aAlias, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractPropertyOption
with the given arguments.AbstractPropertyOption
(String aLongProperty, Class<T> aType, String aDescription, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractPropertyOption
with the given arguments.AbstractPropertyOption
(org.refcodes.struct.Relation<String, T> aProperty, Class<T> aType, Consumer<? extends Operand<T>> aConsumer) Constructs anAbstractPropertyOption
with the given arguments.