| Class | Description |
|---|---|
| ArgumentParser |
This thread-safe class parses the command line arguments provided in form of an array of Strings and instantiates data class such that parsed values can
be obtained from the created instance of data class
For example, consider below: Expected format: -m minute [-s seconds] Command line arguments: -s 45 -m 20 Then, created instance of data class can be used to obtain 20 for minute and 45 for seconds Follow below rules to use this class: Usage expression (like -m minute [-s seconds] can contain as many mandatory and optional expressions as required but optional
expressions cannot be nested
Any other bracket (curly braces or round brackets) must not be present in usage format expression
A variable with name same as specified in usage expression must be present in the data class, along with corresponding setter method
The data type of variable corresponding to name in usage expression must be either of below: String Primitive data type ( boolean, byte, char, short, int, long, float, double)
Wrapper to primitive data type (Boolean, Byte, Character, Short, Integer, Long, Float, Double)
An array of any of the above types
An optional alias can be defined. |
| DataClassValidator |
This thread safe class examines the data class for given list of usage tokens.
|
| FieldValueManager |
This thread safe class parses the command line arguments (as an array of
String) and updates the data class
with available values |
| UsageExpressionExtractor |
This thread-safe class parses the usage expressions and extracts mandatory and optional expressions from it
|
| UsageToken |
This thread-safe class represents a usage token present in the usage expression.
|
| UsageTokenManager |
This thread-safe class extracts and manages the mandatory and optional usage tokens from given usage expression
|
Copyright © 2017. All rights reserved.