Class AntOption
A class that wraps the CLI option and provides Ant specific values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classThe Builder for AntOptions.classAn example code generator for this AntOption.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 TypeMethodDescriptionGets the Ant build type for this option.Cleans up the name of this AntOption.protected StringcleanupName(org.apache.commons.cli.Option option) Provide means to wrap the given option depending on the UI-specific option implementation.Gets the set of options that are mapped to this option.If this option is converted to another option return that option otherwise return this option.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.booleanReturnstrueif the option should be an attribute of the <rat:report> element.booleanReturnstrueif the option should be a child element of the <rat:report> element.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
-
isAttribute
public boolean isAttribute()Returnstrueif the option should be an attribute of the <rat:report> element.- Returns:
trueif the option should be an attribute of the <rat:report> element.
-
toString
-
isElement
public boolean isElement()Returnstrueif the option should be a child element of the <rat:report> element.- Returns:
trueif the option should be a child element of the <rat:report> element.
-
getActualAntOption
If this option is converted to another option return that option otherwise return this option.- Returns:
- the converted option.
-
convertedFrom
Gets the set of options that are mapped to this option. This is used to allow one implementation to answer for multiple options.- Returns:
- the set of options that are mapped to this option.
-
getText
Description copied from class:UIOptionreturn a string showing long and short options if they are available. Will return a string. -
cleanupName
Description copied from class:UIOptionProvide means to wrap the given option depending on the UI-specific option implementation.- Specified by:
cleanupNamein classUIOption<AntOption>- Parameters:
option- The CLI option- Returns:
- the cleaned up option name.
-
cleanupName
Cleans up the name of this AntOption. Used in documentation. Returns either<name>orname attribute.- Returns:
- the cleaned up name.
-
buildType
Gets the Ant build type for this option.- Returns:
- the Ant build type for this option.
-
getExample
Description copied from class:UIOptionGets an example of how to use this option in the native UI.- Specified by:
getExamplein classUIOption<AntOption>- Returns:
- An example of how to use this option in the native UI.
-