Package | Description |
---|---|
org.refcodes.console |
Getting started:
Consider you have a tool called "foo-bar" to be invoked with the below
allowed argument combinations (syntax):
foo-bar [{ -a | -d }] -f <file>
"foo-bar" can be invoked either with an optional "-a" or with an optional
"-d" switch, but not both of them at the same time, and a file
"-f <file>" must be provided, else the passed arguments are rejected as
not being valid.
|
org.refcodes.console.impls |
Implementations:
The
impls package contains implementations of the types defined
by this artifact. |
Modifier and Type | Interface and Description |
---|---|
interface |
Condition
The
Condition interface represents a node in the command line
arguments syntax tree; simply extending the Syntaxable interface and
adding the functionality of providing access to the added Operand s
(leafs). |
interface |
Operand<T>
An
Operand represents a value parsed from command line arguments.An
Operand has a state which changes with each invocation of the
parseArgs(String[]) method. |
interface |
Option<T>
An
Option represents a command line option with the according
option's value. |
interface |
Switch
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractCondition
The
AbstractCondition is an abstract implementation of an
Condition providing the boiler plate when implementing the
Condition interface. |
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 |
AbstractSyntaxable
The
AbstractSyntaxable just implements the
#evalArgs(String[]) method which delegates to the
parseArgs(String[]) method and determines the superfluous arguments. |
class |
AndConditionImpl
An
AndConditionImpl represents a list of Syntaxable instances
of which all are be parsed successfully when the Syntaxable s'
parseArgs(String[]) methods are invoked. |
class |
EnumOptionImpl<T extends Enum<T>> |
class |
ForceSwitchImpl
A predefined force switch.
|
class |
HelpSwitchImpl
A predefined help switch.
|
class |
IntegerOptionImpl |
class |
OptionalConditionImpl |
class |
OrConditionImpl
An
OrConditionImpl represents a list of Syntaxable instances
of which at least one must be parsed successfully when the Syntaxable
s' parseArgs(String[]) methods are invoked. |
class |
QuietSwitchImpl
A predefined "be quiet" switch.
|
class |
StringOperandImpl |
class |
StringOptionImpl |
class |
SwitchImpl |
class |
VerboseSwitchImpl
A predefined verbose switch.
|
class |
XorConditionImpl
An
XorConditionImpl represents a list of Syntaxable instances
of which only one is allowed to be parsed successfully when the
Syntaxable s' parseArgs(String[]) methods are
invoked. |
Modifier and Type | Method and Description |
---|---|
protected List<Syntaxable> |
AbstractCondition.getChildren() |
Modifier and Type | Method and Description |
---|---|
protected void |
AbstractCondition.addChild(Syntaxable aArgumentizer) |
Constructor and Description |
---|
AbstractCondition(Syntaxable... aElements) |
AndConditionImpl(Syntaxable... aArgumentizers) |
OptionalConditionImpl(Syntaxable aSyntaxable) |
OrConditionImpl(Syntaxable... aArgumentizers) |
XorConditionImpl(Syntaxable... aArgumentizers) |
Copyright © 2016. All rights reserved.