Syntax - fedups/com.obdobion.argument GitHub Wiki

List of annotation parameters

* [allowCamelCaps](#allowCamelCaps) * [allowMetaphone](#allowMetaphone) * [caseSensitive](#caseSensitive) * [defaultValues](#defaultValues) * [excludeArgs](#excludeArgs) * [factoryArgName](#factoryArgName) * [factoryMethod](#factoryMethod) * [format](#format) * [help](#help) * [inEnum](#inEnum) * [inList](#inList) * [instanceClass](#instanceClass) * [longName](#longName) * [matches](#matches) * [multimax](#multimax) * [multimin](#multimin) * [positional](#positional) * [range](#range) * [required](#required) * [shortName](#shortName) * [variable](#variable)

allowCamelCaps

ex: `@Arg(allowCamelCaps=true)`

Indicates that the user can specify the argument on the command-line using the Camel Caps version of the long name.

allowMetaphone

ex: `@Arg(allowMetaphone=true)`

Indicates that the user can specify the argument on the command-line with misspellings as long as it evaluates to the Metaphone equivalent of the long name.

caseSensitive

ex: `@Arg(caseSensitive=true)`

Indicates that all values associated with this argument are case sensitive.

defaultValues

ex: `@Arg(defaultValues={"multi","value"})` or `@Arg(defaultValues="1234.56")`

Indicates the default value(s) for this argument.

excludeArgs

ex: `@Arg(excludeArgs={"name"})`

Indicates the arguments from a pojo that should be excluded from the parser.

factoryArgName

ex: `@Arg(factoryArgName="name")`

Indicates the argument from an embedded parser that is to be used as a String parameter to the factory method.

factoryMethod

ex: `@Arg(factoryMethod="com.obdobion.argument.InstantiatorTest$Finder.find")`

Indicates the factory method to be used when creating an instance of this embedded parser. If the method is defined as a static method on the instance class of the variable then only the method name is needed (e.g.: @Arg(factoryMethod="find")).

format

ex: `@Arg(format="MM/dd/yyyy")`

Indicates the date format for types of Date.

help

ex: `@Arg(help="Help that is shown to the user when they type --help")`

Indicates the message that will be included in the usage for this argument.

inEnum

ex: `@Arg(inEnum="java.lang.management.MemoryType")`

Indicates an enum, implying a list of values that will be allowed for this argument.

Otherwise the list of possible enum names can be determined from either the instance variable type of the instanceClass argument. In this case, neither of these can be used to know that an enum is involved and the enumlist provide a set of values that the input will be normalized, verified too.

inList

ex: `@Arg(inList-{"red","green", "blue"})`

Indicates a list of values that will be allowed for this argument.

instanceClass

ex: `@Arg(instanceClass="fully.qualified.ClassName")`

Indicates the class that will be used to create an object for this argument.

longName

ex: `@Arg(longName="inputFileName")`

Indicates the single word, long name of this argument.

matches

ex: `@Arg(matches="[a-zA-Z]")`

Indicates a verification pattern to be run against the user input before it will be accepted.

multimax

ex: `@Arg(multimax=4)`

Indicates the maximum allowed number of values that will be accepted for this argument.

multimin

ex: `@Arg(multimin=2)`

Indicates the minimum allowed number of values that will be accepted for this argument.

positional

ex: `@Arg(positional=true)`

Indicates that a name is not allowed for this argument.

range

ex: `@Arg(range={"3","9"})`

Indicates a criteria to be applied to the user's input.

required

ex: `@Arg(required=true)`

Indicates that this argument is required - the user must provide the argument.

shortName

ex: `@Arg(shortName='i')`

Indicates the single character, short name of this argument.

variable

ex: `@Arg(variable="aVariableName")`

Indicates that a variable in the complex class of the previous @Arg annotation (without the variable parameter) is to be annotated.

⚠️ **GitHub.com Fallback** ⚠️