Class AntOption
java.lang.Object
org.apache.rat.documentation.options.AbstractOption
org.apache.rat.documentation.options.AntOption
A class that wraps the CLI option and provides Ant specific values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclass
An example code generator for this AntOption. -
Field Summary
Fields inherited from class org.apache.rat.documentation.options.AbstractOption
argumentType, name, option, PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
cleanupName
(org.apache.commons.cli.Option option) Provide means to wrap the given option depending on the UI-specific option implementation.Set
<org.apache.commons.cli.Option> Gets the set of options that are mapped to this option.static String
createName
(org.apache.commons.cli.Option option) If this option is converted to another option return that option otherwise return this option.Gets the list of all available Ant options.Get the signature of the attribute function.getComment
(boolean addParam) Get the method comment for this option.Gets an example of how to use this option in the native UI.static Set
<org.apache.commons.cli.Option> Gets the set of options that are not supported by Ant either by not being supported or by being converted to another argument.getText()
return a string showing long and short options if they are available.static List
<org.apache.commons.cli.Option> Gets the list of unsupported options.boolean
Returnstrue
if the option should be an attribute of the <rat:report> element.boolean
Returnstrue
if the option should be a child element of the <rat:report> element.Methods inherited from class org.apache.rat.documentation.options.AbstractOption
argCount, cleanup, cleanupName, getArgName, getArgType, getDefaultValue, getDeprecated, getDescription, getName, getOption, getType, hasArg, hasArgs, isDeprecated, isRequired, keyValue
-
Constructor Details
-
AntOption
public AntOption(org.apache.commons.cli.Option option) Constructor.- Parameters:
option
- the option to wrap.
-
-
Method Details
-
getAntOptions
Gets the list of all available Ant options.- Returns:
- the list of all available Ant options.
-
getUnsupportedOptions
Gets the list of unsupported options.- Returns:
- the list of unsupported options.
-
getFilteredOptions
Gets the set of options that are not supported by Ant either by not being supported or by being converted to another argument.- Returns:
- The set of options that are not supported by Ant.
-
getRenameMap
-
createName
-
isAttribute
public boolean isAttribute()Returnstrue
if the option should be an attribute of the <rat:report> element.- Returns:
true
if the option should be an attribute of the <rat:report> element.
-
isElement
public boolean isElement()Returnstrue
if the option should be a child element of the <rat:report> element.- Returns:
true
if 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.- Returns:
- the set of options that are mapped to this option.
-
getText
Description copied from class:AbstractOption
return a string showing long and short options if they are available. Will return a string.- Specified by:
getText
in classAbstractOption
- Returns:
- A string showing long and short options if they are available. Never
null
.
-
cleanupName
Description copied from class:AbstractOption
Provide means to wrap the given option depending on the UI-specific option implementation.- Specified by:
cleanupName
in classAbstractOption
- Parameters:
option
- The CLI option- Returns:
- the cleaned up option name.
-
getComment
Get the method comment for this option.- Parameters:
addParam
- iftrue
the param annotation is added.- Returns:
- the Comment block for the function.
-
getAttributeFunctionName
Get the signature of the attribute function.- Returns:
- the signature of the attribute function.
-
getExample
Description copied from class:AbstractOption
Gets an example of how to use this option in the native UI.- Specified by:
getExample
in classAbstractOption
- Returns:
- An example of how to use this option in the native UI.
-