|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hyphenType.documentation.DocumentationFormatterEngine<T,V>
T
- TODOV
- TODOpublic abstract class DocumentationFormatterEngine<T extends Options<?>,V extends Annotation>
Constructor Summary | |
---|---|
protected |
DocumentationFormatterEngine()
|
Method Summary | ||
---|---|---|
static
|
buildFormatter(Class<A> optionsInterface,
Class<B> formatterAnnotationClass)
Builds a formatter based on the options interface and the formatter annotation. |
|
V |
getAnnotation()
|
|
String |
getMessage(String key,
String defaultValue)
|
|
protected String |
getOptionsInterfaceValue(String key)
Retrieves messages from the resource bundles. |
|
protected String |
getOptionsInterfaceValue(String key,
String defaultValue)
Retrieves messages from the resource bundles. |
|
protected String |
getStatusCodeUserDescription(Enum<?> statusCode)
|
|
static DocumentationFormatterEngine |
preferredFormatter(Class<? extends Options<?>> optionsInterface)
Builds the preferred formatter. |
|
void |
printDocumentation()
Prints the documentation to the default stdout (System.out). |
|
void |
printDocumentation(PrintStream pw)
Prints the documentation to the given PrintStream . |
|
protected abstract void |
printDocumentation(PrintStream pw,
LexerParser<T> parser,
V formatterAnnotation)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected DocumentationFormatterEngine()
Method Detail |
---|
public final V getAnnotation()
public final String getMessage(String key, String defaultValue)
key
- TODOdefaultValue
- TODO
public final void printDocumentation()
public final void printDocumentation(PrintStream pw)
PrintStream
. Tip: A very
convenient way to save the output to a file is to call
printDocumentation(new PrintStream("file.name"));
pw
- TODOprotected abstract void printDocumentation(PrintStream pw, LexerParser<T> parser, V formatterAnnotation)
pw
- TODOparser
- TODOformatterAnnotation
- TODOprotected final String getOptionsInterfaceValue(String key, String defaultValue) throws StringParsingError
key
- TODOdefaultValue
- TODO
StringParsingError
- TODOprotected final String getOptionsInterfaceValue(String key) throws StringParsingError
key
- TODO
StringParsingError
- TODOprotected final String getStatusCodeUserDescription(Enum<?> statusCode) throws StringParsingError
key
- TODO
StringParsingError
- TODOpublic static DocumentationFormatterEngine preferredFormatter(Class<? extends Options<?>> optionsInterface)
ArgumentsObject.preferredDocumentationFormatter()
.
optionsInterface
- TODO
public static <A extends Options<?>,B extends Annotation> DocumentationFormatterEngine<A,B> buildFormatter(Class<A> optionsInterface, Class<B> formatterAnnotationClass)
A
- The options interface class.B
- The documentation formatter annotation.optionsInterface
- The options interface class.formatterAnnotationClass
- The documentation formatter annotation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |