java.lang.Object
org.jgroups.raft.util.PropsToAsciidoc
Iterates over all concrete Protocol classes and creates tables with Protocol's properties.
These tables are in turn then merged into asciidoc.
Iterates over unsupported and experimental classes and creates tables listing those classes.
These tables are in turn then merged into asciidoc.
- Author:
- Vladimir Blagojevic, Bela Ban
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidconvertUnsupportedToAsciidocTable(Properties props, List<Class<?>> clazzes, String title) static intprotected static StringcreateAsciidocTable(List<String[]> rows, String title, String header) Creates an AsciiDoc table of the elements in rows.protected static voidstatic voidprotected static StringReads until the next bracket '}' and returns the string excluding the bracket, or throws an exception if no bracket has been foundprotected static voidreplaceVariables(InputStream in, OutputStream out, Properties p) Reads from the input stream and replaces occurrences of ${PROT} with p.get("PROT") and writes this to the output stream.protected static voidwriteVarToStream(String var, Properties p, OutputStream out)
-
Field Details
-
ROOT_PACKAGE
- See Also:
-
-
Constructor Details
-
PropsToAsciidoc
public PropsToAsciidoc()
-
-
Method Details
-
main
-
convertUnsupportedToAsciidocTable
protected static void convertUnsupportedToAsciidocTable(Properties props, List<Class<?>> clazzes, String title) throws ParserConfigurationException, TransformerException -
createAsciidocTable
protected static String createAsciidocTable(List<String[]> rows, String title, String header) throws ParserConfigurationException, TransformerException Creates an AsciiDoc table of the elements in rows. The first tuple needs to be the column names, the rest the contents -
getDescriptions
protected static void getDescriptions(Class<?> clazz, Map<String, String> m, String prefix, boolean print_class) throws IOException, ClassNotFoundException- Throws:
IOExceptionClassNotFoundException
-
replaceVariables
Reads from the input stream and replaces occurrences of ${PROT} with p.get("PROT") and writes this to the output stream. If no value is found, then the ${PROT} will simple be omitted from the output. Escaped values of the form \${PROT} are not looked up and the value without the backslash will be written to the output stream. -
writeVarToStream
protected static void writeVarToStream(String var, Properties p, OutputStream out) throws IOException - Throws:
IOException
-
readUntilBracket
Reads until the next bracket '}' and returns the string excluding the bracket, or throws an exception if no bracket has been found- Throws:
IOException
-
copy
- Throws:
IOException
-