|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.tum.cs.commons.options.OptionRegistry
public class OptionRegistry
This class supports collecting options from several objects whose methods
have been annotated with AOption
.
Constructor Summary | |
---|---|
OptionRegistry()
Default constructor. |
|
OptionRegistry(java.lang.Object optionHandler)
Construct a new option registry and register the given option handler. |
Method Summary | |
---|---|
java.util.List<AOption> |
getAllOptions()
Returns a list containing all supported options. |
edu.tum.cs.commons.options.OptionApplicator |
getLongOption(java.lang.String name)
Returns the OptionApplicator for the given short option name or null if no such options exists. |
edu.tum.cs.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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OptionRegistry()
public OptionRegistry(java.lang.Object optionHandler)
optionHandler
- the option handler to register.Method Detail |
---|
public void registerOptionHandler(java.lang.Object optionHandler)
optionHandler
- The object to extract the options from.public edu.tum.cs.commons.options.OptionApplicator getShortOption(char name)
name
- the name of the requested option.
public edu.tum.cs.commons.options.OptionApplicator getLongOption(java.lang.String name)
name
- the name of the requested option.
public java.util.List<AOption> getAllOptions()
|
TUM CCSM Commons | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |