Package org.apache.rat.tools
Class AntOption
java.lang.Object
org.apache.rat.tools.AbstractOption
org.apache.rat.tools.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.tools.AbstractOption
argumentType, name, option, PATTERN
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
cleanupName
(org.apache.commons.cli.Option option) Set
<org.apache.commons.cli.Option> 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.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.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.tools.AbstractOption
argCount, cleanup, cleanupName, getArgName, getArgType, getDefaultValue, getDeprecated, getDescription, getName, 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
-
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.
-
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.
-
cleanupName
- Specified by:
cleanupName
in classAbstractOption
-
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.
-