Package org.jgroups.util
Class PropertiesToAsciidoc
java.lang.Object
org.jgroups.util.PropertiesToAsciidoc
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.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidconvertClassToAsciidocTable(Properties props, Class<?> clazz, String prefix) protected 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.private static StringfileToString(File f) protected static void(package private) static voidhelp()static 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
-
PropertiesToAsciidoc
public PropertiesToAsciidoc()
-
-
Method Details
-
main
-
help
static void help() -
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 -
convertClassToAsciidocTable
private static void convertClassToAsciidocTable(Properties props, Class<?> clazz, String prefix) throws Exception - Throws:
Exception
-
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
-
fileToString
- Throws:
Exception
-
copy
- Throws:
IOException
-