public class ToolUtil
extends java.lang.Object
| Constructor and Description |
|---|
ToolUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
diagToString(Diag diag,
boolean colored)
Produce a string for the diagnosis, with optional coloring.
|
static void |
reportDiags(DiagCollector diagCollector,
boolean colored)
Report errors and warnings.
|
static java.util.List<java.lang.String> |
sanitizeSourceFiles(java.lang.Iterable<java.lang.String> sources)
Sanitize the sources list removing any unwanted files.
|
static void |
setupModelConfigs(Model model,
java.util.List<java.lang.String> configs)
Sets up the model configs, reading them from Yaml files and attaching to the model.
|
static void |
writeFiles(java.util.Map<java.lang.String,?> content,
java.lang.String baseName)
Writes a content object into a set of output files.
|
static void |
writeJar(java.util.Map<java.lang.String,?> content,
java.lang.String outputName)
Writes a set of files with directory structure to a .jar.
|
static void |
writeProto(com.google.protobuf.Message content,
java.lang.String outputName)
Writes a proto out to a file.
|
public static void writeJar(java.util.Map<java.lang.String,?> content,
java.lang.String outputName)
throws java.io.IOException
Doc, String, or byte[].java.io.IOExceptionpublic static void writeProto(com.google.protobuf.Message content,
java.lang.String outputName)
throws java.io.IOException
java.io.IOExceptionpublic static void writeFiles(java.util.Map<java.lang.String,?> content,
java.lang.String baseName)
throws java.io.IOException
java.io.IOExceptionpublic static void reportDiags(DiagCollector diagCollector, boolean colored)
public static java.lang.String diagToString(Diag diag, boolean colored)
public static java.util.List<java.lang.String> sanitizeSourceFiles(java.lang.Iterable<java.lang.String> sources)
public static void setupModelConfigs(Model model, java.util.List<java.lang.String> configs)