Class MavenOption
A representation of a Maven option based on an option.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe builder for the MavenOptions.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 TypeMethodDescriptionprotected 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.getExample(String... args) Create example text for the option.Gets the method name for this option.getMethodSignature(String indent, boolean multiple) Gets the Maven Mojo method signature for this Option.getParameterAnnotation(String camelName) Creates the@Parameterannotation for this option.getText()return a string showing long and short options if they are available.toString()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
-
toString
-
getMethodName
Gets the method name for this option.- Returns:
- the method name for this option.
-
cleanupName
Description copied from class:UIOptionProvide means to wrap the given option depending on the UI-specific option implementation.- Specified by:
cleanupNamein classUIOption<MavenOption>- Parameters:
option- The CLI option- Returns:
- the cleaned up option name.
-
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<MavenOption>- Returns:
- A string showing long and short options if they are available. Never
null.
-
getExample
Description copied from class:UIOptionGets an example of how to use this option in the native UI.- Specified by:
getExamplein classUIOption<MavenOption>- Returns:
- An example of how to use this option in the native UI.
-
getExample
Create example text for the option.- Parameters:
args- the example arguments for the option.- Returns:
- a formatted option.
-
getMethodSignature
Gets the Maven Mojo method signature for this Option.- Parameters:
indent- the number of spaces to indent the text.multiple-trueif this option takes multiple arguments.- Returns:
- the method signature for this Option.
-
getParameterAnnotation
Creates the@Parameterannotation for this option.- Parameters:
camelName- the camel cased name for this option.- Returns:
- the string that is the parameter annotation.
-