a map storing the data available for the single options
a set with data about input parameters
the object with information about aliases
a key to the option that is currently defined
a list with the currently active group names
Returns an updated ModelContext with a an AliasMapping that is modified to contain the new alias provided for the current key.
Returns an updated ModelContext with a an AliasMapping that is modified to contain the new alias provided for the current key.
the new alias for this key
the updated ModelContext
Adds an attribute for the current option.
Adds an attribute for the current option. This function is called by CliExtractor objects to add more detailed information about a command line option. It refers to the last option that has been added.
the data type of the attribute
the key of the attribute
the value of the attribute
the updated ModelContext
Adds data about an input parameter to this object.
Adds data about an input parameter to this object. This function works similar to addOption(), but creates additional information to keep track on the order of these parameters.
the index of the input parameter
the optional key; if it is undefined, a key is generated
an optional help text
the updated ModelContext
Adds data about another command line option to this object.
Adds data about another command line option to this object. This function creates a new ParameterAttributes instance and initializes it from the parameters passed in. It returns a new ModelContext object whose data map contains this new instance. If there is already an entry for this parameter key, it is merged with the data passed to this function.
the parameter key
an optional help text
the updated ModelContext
the object with information about aliases
Notifies this context that a group has been processed.
Notifies this context that a group has been processed. The name of the current group is removed.
the updated ModelContext
Notifies this context that a group has potentially been processed.
Notifies this context that a group has potentially been processed. If the given Option with the group name is defined, the name of the current group is removed; otherwise, this context is returned unchanged.
the Option with the group name
the updated ModelContext or the same one
Checks whether the command line option with the given key has a specific attribute set.
Checks whether the command line option with the given key has a specific attribute set. Only the presence of the attribute is checked, not the concrete value.
the key of the parameter
the key of the attribute
a flag whether this attribute is present for this option; if the option cannot be resolved, result is false
a set with data about input parameters
a map storing the data available for the single options
Returns an Iterable with the ParameterMetaData stored in this object.
Returns an Iterable with the ParameterMetaData stored in this object.
This implementation returns data about all the parameters defined by the application.
an Iterable with the ParameterMetaData available
Notifies this context about the start of a new group.
Notifies this context about the start of a new group. New options that are added later are assigned to this group.
the name of the group
the updated ModelContext
Notifies this context about a potential start of a new group.
Notifies this context about a potential start of a new group. If the group name is defined, a new group is started; otherwise, the same context is returned.
the optional group name
the updated ModelContext or the same one
(Since version ) see corresponding Javadoc for more information.
A class for storing and updating meta information about command line parameters.
An instance of this class is available in the context passed to CliExtractor objects. The extractors update the instance with specific information, so that metadata about the options supported by the application is collected. This data can then be used for various purposes, e.g. to correctly parse the command line or to generate rich help texts.