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>>
The Class EnumOption.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 ofArgsSyntax
tree and returns the (first) operand matching the given alias and type.default <T extends Operand<?>>
TTraverses the hierarchy ofArgsSyntax
tree and returns the (first) operand matching the given type.<T extends Operand<?>>
TTraverses the hierarchy ofArgsSyntax
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 ofArgsSyntax
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 rootArgsSyntax
.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 and determines the according values by evaluating the rootArgsSyntax
.Heuristically loads the arguments without any syntax required, e.g.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.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.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.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.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.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.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.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.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.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.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.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.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.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.AbstractCondition.toOperands()
Traverses the hierarchy ofArgsSyntax
s and collects all therein foundOperand
s and sub-types such as theFlag
or theOption
.ArgsSyntax.toOperands()
Traverses the hierarchy ofArgsSyntax
s and collects all therein foundOperand
s and sub-types such as theFlag
or theOption
.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
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.toOptionsSpec
(Operand<?> aOperand, String aOptEscCode, String aResetEscCode) 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.toParameterSpec
(Operand<?> aOperand, int aMin, int aMax, String aParamEscCode, String aResetEscCode) Creates the parameter specification from the providedOperand
.static String
CliUtility.toParameterSpec
(Operand<?> aOperand, String aParamEscCode, String aResetEscCode) Creates the parameter specification from the providedOperand
.static String
CliUtility.toShortOptionsSpec
(Operand<?> aOperand) Creates the options specification containing the short option only (if any) or(!)static String
CliUtility.toShortOptionsSpec
(Operand<?> aOperand, String aOptEscCode, String aResetEscCode) Creates the options specification containing the short option only (if any) or(!)static String
CliUtility.toShortSpec
(Operand<?> aOperand) Creates a specification for the givenOperand
consisting of the short option specification (if any) or the long option specification(if any) and the parameter specification (if any) as ofCliUtility.toParameterSpec(Operand)
.static String
CliUtility.toShortSpec
(Operand<?> aOperand, String aOptEscCode, String aParamEscCode, String aResetEscCode) Creates a specification for the givenOperand
consisting of the short option specification (if any) or the long option specification(if any) and the parameter specification (if any) as ofCliUtility.toParameterSpec(Operand)
.static String
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)
.static String
CliUtility.toSpec
(Operand<?> aOperand, String aOptEscCode, String aParamEscCode, String aResetEscCode) 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.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.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.