Modifier and Type | Interface | Description |
---|---|---|
interface |
Option<T> |
An
Option represents a command line option with the according
option's value. |
Modifier and Type | Class | Description |
---|---|---|
class |
AbstractOperand<T> |
The
AbstractOperand is an abstract implementation of an
Operand providing the boiler plate when implementing the
Operand interface. |
class |
AbstractOption<T> |
The
AbstractOption is an abstract implementation of an Option
providing the boiler plate when implementing the Option interface. |
class |
ArrayOperand<T> |
Creates an array representation facade for the encapsulated
Operand . |
class |
ArrayOption<T> |
Creates an array representation facade for the encapsulated
Option . |
class |
CharOption |
|
class |
DebugFlag |
A predefined debug switch.
|
class |
DoubleOption |
|
class |
EnumOption<T extends Enum<T>> |
The Class EnumOption.
|
class |
FileOption |
|
class |
Flag |
The
Flag class implements the Option interface for
representing either a true or a false state: When a
flag is provided to your command line arguments, then it is considered to be
true , when it is omitted, then it is considered to be
false as of Flag.isEnabled() . |
class |
FloatOption |
|
class |
ForceFlag |
A predefined force switch.
|
class |
HelpFlag |
A predefined help switch.
|
class |
IntOption |
|
class |
LongOption |
|
class |
Operation |
The
Operation is an argument representing a function or a method and
is either provided or not provided as of Operation.isEnabled() . |
class |
QuietFlag |
A predefined "be quiet" switch.
|
class |
StringOperand |
|
class |
StringOption |
|
class |
SysInfoFlag |
A predefined system information switch.
|
class |
VerboseFlag |
A predefined verbose switch.
|
Modifier and Type | Method | Description |
---|---|---|
protected Operand<T> |
ArrayOperand.getOperand() |
Hook for accessing the encapsulated
Operand . |
Operand<?>[] |
ExampleUsage.getOperands() |
Retrieves the command line arguments required by the example.
|
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 root
Condition . |
default List<? extends Operand<?>> |
ArgsParser.evalArgs(List<String> aArgs) |
Same as
ArgsParser.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 root
Condition . |
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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable 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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable instances'
Syntaxable.parseArgs(String[], String[]) methods. |
List<? extends Operand<?>> |
AndCondition.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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable 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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable 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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable instances'
Syntaxable.parseArgs(String[], String[]) methods. |
List<? extends Operand<?>> |
OptionalCondition.parseArgs(String[] aArgs,
String[] aOptions) |
|
List<? extends Operand<?>> |
OptionConditionFacade.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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable 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 this
Syntaxable instance or, in case of
being a node in the syntax tree (such as a Condition , traversing
the child Syntaxable instances'
Syntaxable.parseArgs(String[], String[]) methods. |
List<? extends Operand<?>> |
XorCondition.parseArgs(String[] aArgs,
String[] aOptions) |
|
List<Operand<?>> |
AbstractCondition.toOperands() |
|
List<? extends Operand<?>> |
Condition.toOperands() |
Modifier and Type | Method | Description |
---|---|---|
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.
|
void |
ArgsParserImpl.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 encapsulated
Operand . |
static <T> ArrayOperand<T> |
CliSugar.asArray(Operand<T> aOperand,
int aLength) |
Creates an array representation facade for the encapsulated
Operand . |
static <T> ArrayOperand<T> |
CliSugar.asArray(Operand<T> aOperand,
int aMinLength,
int aMaxLength) |
Creates an array representation facade for the encapsulated
Operand . |
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 provided
Operand ;. |
static String |
CliUtility.toParameterSpec(Operand<?> aOperand) |
Creates the parameter specification from the provided
Operand . |
static String |
CliUtility.toParameterSpec(Operand<?> aOperand,
int aMin,
int aMax) |
Creates the parameter specification from the provided
Operand . |
static String |
CliUtility.toSpec(Operand<?> aOperand) |
Creates a specification for the given
Operand consisting of the
options specification (if any) as of CliUtility.toOptionsSpec(Operand) and
the parameter specification (if any) as of
CliUtility.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.
|
Modifier and Type | Method | Description |
---|---|---|
static String[] |
CliUtility.toDiff(String[] aSet,
List<? extends Operand<?>> aSubset) |
Constructor | Description |
---|---|
ArrayOperand(Operand<T> aOperand) |
Constructs the
ArrayOperand by encapsulating the given
Operand and providing its definition as array definition to the
CLI. |
ArrayOperand(Operand<T> aOperand,
int aLength) |
Constructs the
ArrayOperand by encapsulating the given
Operand and providing its definition as array definition to the
CLI. |
ArrayOperand(Operand<T> aOperand,
int aMinLength,
int aMaxLength) |
Constructs the
ArrayOperand by encapsulating the given
Operand and providing its definition as array definition to the
CLI. |
ExampleUsage(String aDescription,
Operand<?>... aOperands) |
Constructs an example usage.
|
Copyright © 2021. All rights reserved.