Package org.apache.rat.testhelpers
Class BaseOption
An implementation of UIOption to use in general (non-UI limited or adjusted) testing.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe BaseOptionBuilder implementation.Nested classes/interfaces inherited from class org.apache.rat.ui.UIOption
UIOption.Builder<T extends UIOption<T>,B extends UIOption.Builder<T, B>> -
Field Summary
Fields inherited from class org.apache.rat.ui.UIOption
argumentType, name, option, optionCollection, PATTERN -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder for the BaseOption.protected StringcleanupName(org.apache.commons.cli.Option option) Provide means to wrap the given option depending on the UI-specific option implementation.Gets an example of how to use this option in the native UI.getText()return a string showing long and short options if they are available.Methods inherited from class org.apache.rat.ui.UIOption
cleanup, equals, getArgName, getArgType, getCasedName, getDefaultValue, getDeprecated, getDescription, getName, getOption, getOptionCollection, getType, hasArg, hasArgs, hashCode, isDeprecated, isRequired, keyValue
-
Method Details
-
builder
Creates a builder for the BaseOption.- Returns:
- the BaseOptionBuilder.
-
cleanupName
Description copied from class:UIOptionProvide means to wrap the given option depending on the UI-specific option implementation.- Specified by:
cleanupNamein classUIOption<BaseOption>- Parameters:
option- The CLI option- Returns:
- the cleaned up option name.
-
getExample
Description copied from class:UIOptionGets an example of how to use this option in the native UI.- Specified by:
getExamplein classUIOption<BaseOption>- Returns:
- An example of how to use this option in the native UI.
-
getText
Description copied from class:UIOptionreturn a string showing long and short options if they are available. Will return a string.- Specified by:
getTextin classUIOption<BaseOption>- Returns:
- A string showing long and short options if they are available. Never
null.
-