org.hyphenType.datastructure.annotations
Annotation Type ArgumentsObject


@Retention(value=RUNTIME)
@Target(value=TYPE)
public @interface ArgumentsObject

Author:
Aurelio Akira M. Matsui

Optional Element Summary
 String description
          Documentation of the options interface.
 boolean documentStatusCodes
          Sets whether or not calls to Options#printDocumentation(), or Options#printDocumentation(java.io.PrintStream) should generate documentation for status codes.
 String doubleHyphen
           
 boolean doubleHyphenInLongOptions
          Whether long options (those with more than one character) will automatically receive two hyphens.
 String equals
          The string that will be used as the equals sign.
 Class<? extends Annotation> preferredDocumentationFormatter
          The class that will format the documentation.
 String resourceBundlesEncoding
          Configures which encoding will be used to read resource bundle files.
 String resourceBundlesLocation
          The path to find the resource bundles containing the documentation.
 String singleHyphen
          The string that will be used as the single hyphen.
 Class<? extends StatusCode> statusCodeEnum
          The status code enumeration for this arguments object.
 

resourceBundlesLocation

public abstract String resourceBundlesLocation
The path to find the resource bundles containing the documentation. If this property is empty, will search for the resource bundles in the same package as the arguments object interface is. Paths are directly forwarded to ResourceBundle#getBundle(String), and therefore, should be fully qualified names pointing to a set of property files. This property is useful when the same set of resource bundles are shared between several classes.

If the value of this property is the empty string (the default value), the fully qualified name of the options interface will be used instead. In other words, if the options interface is a.b.C, and if this property is an empty string, then files such as a.b.C.properties, a.b.C_es.properties, etc... (in other words, the files /a/b/C.properties and /a/b/C_es.properties where / is the root of the JAR file) will be used.

See ResourceBundle#getBundle(String baseName, Locale locale, ClassLoader loader) for more information.

See Also:
ResourceBundle#getBundle(String baseName, Locale locale, ClassLoader loader)
Default:
""

resourceBundlesEncoding

public abstract String resourceBundlesEncoding
Configures which encoding will be used to read resource bundle files.

Default:
"UTF-8"

description

public abstract String description
Documentation of the options interface. This documentation is overridden by data from resource bundles, if present.

Default:
""

doubleHyphenInLongOptions

public abstract boolean doubleHyphenInLongOptions
Whether long options (those with more than one character) will automatically receive two hyphens.

Default:
true

singleHyphen

public abstract String singleHyphen
The string that will be used as the single hyphen. A single hyphen is the prefix for single character options. A single hyphen is used not only to mark the start of an option whose name is a single character (e.g.: "-n" for an option named "n"), but also to start a cluster of single character options (e.g.: "-xcvf" which is short for "-x -c -v -f").

Default:
"-"

doubleHyphen

public abstract String doubleHyphen
Default:
"--"

equals

public abstract String equals
The string that will be used as the equals sign. In other words, the symbol that will be used to separate keys from values.

Default:
"="

preferredDocumentationFormatter

public abstract Class<? extends Annotation> preferredDocumentationFormatter
The class that will format the documentation. The formatter class will be used when the following methods are called: Which are mapped by ArgumentsInvocationHandler to these methods:

Default:
org.hyphenType.documentation.lib.StandardFormatterEngine.StandardFormatter.class

statusCodeEnum

public abstract Class<? extends StatusCode> statusCodeEnum
The status code enumeration for this arguments object.

Default:
org.hyphenType.exit.CanonicalExitCode.class

documentStatusCodes

public abstract boolean documentStatusCodes
Sets whether or not calls to Options#printDocumentation(), or Options#printDocumentation(java.io.PrintStream) should generate documentation for status codes. The standard interpretation for status codes is that a zero means a successful program termination while any non-zero number is a unique error code. A caller program or shell could then read this error code and act accordingly, or show a custom message to a user.

Nevertheless, there are cases in which status codes are not important.

Status codes may be simply ignored by programmers (perhaps because they simply return zero despite of what happened during program execution). Finally, status codes may be used to return some numerical value (although this is considered a violation of the convention). In all these cases above, the programmer may chose to simply omit information about status codes from his/her documentation. This flags allows the programmer to do so, although the actual behavior of this flag will depend upon the implementation of DocumentationFormatterEngine in use.

See Also:
statusCodeEnum(), preferredDocumentationFormatter()
Default:
false


Copyright © 2013. All Rights Reserved.