public class OptionRegistry extends java.lang.Object
Option
.Constructor and Description |
---|
OptionRegistry()
Default constructor.
|
OptionRegistry(java.lang.Object optionHandler)
Construct a new option registry and register the given option handler.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<Option> |
getAllOptions()
Returns a list containing all supported options.
|
org.conqat.lib.commons.options.OptionApplicator |
getLongOption(java.lang.String name)
Returns the OptionApplicator for the given short option name or null if no
such options exists.
|
org.conqat.lib.commons.options.OptionApplicator |
getShortOption(char name)
Returns the OptionApplicator for the given short option name or null if no
such options exists.
|
void |
registerOptionHandler(java.lang.Object optionHandler)
Adds all options provided by the given object to this registry.
|
public OptionRegistry()
public OptionRegistry(java.lang.Object optionHandler)
optionHandler
- the option handler to register.public void registerOptionHandler(java.lang.Object optionHandler)
optionHandler
- The object to extract the options from.public org.conqat.lib.commons.options.OptionApplicator getShortOption(char name)
name
- the name of the requested option.public org.conqat.lib.commons.options.OptionApplicator getLongOption(java.lang.String name)
name
- the name of the requested option.public java.util.List<Option> getAllOptions()