Search in sources :

Example 6 with JsonWriter

use of com.oracle.svm.configure.json.JsonWriter in project graal by oracle.

the class RuleNode method printJsonTree.

public void printJsonTree(OutputStream out) throws IOException {
    try (JsonWriter writer = new JsonWriter(new OutputStreamWriter(out))) {
        writer.append('{');
        writer.indent().newline();
        writer.quote("rules").append(": [").indent().newline();
        final boolean[] isFirstRule = { true };
        printJsonEntries(writer, isFirstRule, "");
        writer.unindent().newline();
        writer.append(']').unindent().newline();
        writer.append('}').newline();
    }
}
Also used : OutputStreamWriter(java.io.OutputStreamWriter) JsonWriter(com.oracle.svm.configure.json.JsonWriter)

Aggregations

JsonWriter (com.oracle.svm.configure.json.JsonWriter)6 IOException (java.io.IOException)3 Path (java.nio.file.Path)3 ArrayList (java.util.ArrayList)3 ConfigurationFile (com.oracle.svm.core.configure.ConfigurationFile)2 ConfigurationSet (com.oracle.svm.configure.config.ConfigurationSet)1 ResourceConfiguration (com.oracle.svm.configure.config.ResourceConfiguration)1 FilterConfigurationParser (com.oracle.svm.configure.filters.FilterConfigurationParser)1 RuleNode (com.oracle.svm.configure.filters.RuleNode)1 AccessAdvisor (com.oracle.svm.configure.trace.AccessAdvisor)1 TraceProcessor (com.oracle.svm.configure.trace.TraceProcessor)1 ResourceConfigurationParser (com.oracle.svm.core.configure.ResourceConfigurationParser)1 ResourcesRegistry (com.oracle.svm.core.configure.ResourcesRegistry)1 BufferedReader (java.io.BufferedReader)1 InputStreamReader (java.io.InputStreamReader)1 OutputStreamWriter (java.io.OutputStreamWriter)1 PipedReader (java.io.PipedReader)1 PipedWriter (java.io.PipedWriter)1 Reader (java.io.Reader)1 StringWriter (java.io.StringWriter)1