|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- The enumeration for status codespublic interface Options<T extends Enum<?> & StatusCode>
Interface that should be extended by all options interfaces.
Method Summary | |
---|---|
void |
exit(int code,
Object... args)
Terminates the JVM or other current environment |
boolean |
exit(Throwable throwable)
Terminates the JVM or other current environment. |
void |
exit(T status,
Object... arguments)
Terminates the JVM or other current environment |
String |
formattedLocaleMessage(String key,
Object... values)
Equivalent to localeMessage(String) , but
wraps a procedure that allows for replacement of variables
within the messages. |
String |
formattedLocaleMessageDefault(String key,
String defaultValue,
Object... values)
Equivalent to localeMessage(String) , but
wraps a procedure that allows for replacement of variables
within the messages. |
String |
localeMessage(String key)
Gets a message from the resource bundle of the current locale. |
String |
localeMessage(String key,
String defaultValue)
Gets a message from the resource bundle of the current locale. |
void |
printDocumentation()
Prints the documentation using the preferred documentation formatter to the standard System.out . |
void |
printDocumentation(Class<? extends Annotation> formatterClass)
Prints the documentation using the given documentation formatter to the standard System.out . |
void |
printDocumentation(Class<? extends Annotation> formatterClass,
PrintStream pw)
Prints the documentation using the given documentation formatter. |
void |
printDocumentation(PrintStream pw)
Prints the documentation using the preferred documentation formatter. |
String[] |
rawArguments()
Retrieves the array of arguments as they were received from the user. |
List<LexToken> |
unparsedArguments()
All the arguments that were ignored by the parsing process. |
Method Detail |
---|
void printDocumentation()
System.out
. Note: if not explicitly set,
the preferred formatter is the one defined as the default value of
the ArgumentsObject.preferredDocumentationFormatter()
property.
void printDocumentation(PrintStream pw)
ArgumentsObject.preferredDocumentationFormatter()
property.
pw
- void printDocumentation(Class<? extends Annotation> formatterClass)
System.out
. Uses the given documentation
formatter.
TODO What happens if we try to load the annotation from the resource bundles but the annotation is not complete?
formatterClass
- void printDocumentation(Class<? extends Annotation> formatterClass, PrintStream pw)
PrintStream
instead of System.out
.
TODO What happens if we try to load the annotation from the resource bundles but the annotation is not complete?
formatterClass
- pw
- List<LexToken> unparsedArguments()
void exit(T status, Object... arguments)
status
- The status code to terminate the JVMarguments
- The arguments that will be passed to StatusCode#beforeExit()
.void exit(int code, Object... args)
code
- The status code to terminate the JVMarguments
- The arguments that will be passed to StatusCode#beforeExit()
.boolean exit(Throwable throwable)
throwable
- The throwable object that will be carried to the ExitStatusHelper
.
String[] rawArguments()
String localeMessage(String key)
key
- The key to search for.
String localeMessage(String key, String defaultValue)
key
- The key to search for.defaultValue
- The default value, in case the key was not found.
String formattedLocaleMessage(String key, Object... values)
localeMessage(String)
, but
wraps a procedure that allows for replacement of variables
within the messages. This procedure uses a MessageFormat
to replace variables.
key
- The key to search for.values
- The values to replace each variable.
MessageFormat
String formattedLocaleMessageDefault(String key, String defaultValue, Object... values)
localeMessage(String)
, but
wraps a procedure that allows for replacement of variables
within the messages. This procedure uses a MessageFormat
to replace variables.
key
- The key to search for.defaultValue
- The default value, in case the key was not found.values
- The values to replace each variable.
MessageFormat
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |