use of com.oracle.svm.core.configure.ConfigurationFile in project graal by oracle.
the class ConfigurationWithOriginsResultWriter method writeToDirectory.
@Override
public List<Path> writeToDirectory(Path directoryPath) throws IOException {
List<Path> writtenPaths = new ArrayList<>();
for (ConfigurationFile configFile : ConfigurationFile.values()) {
if (configFile.canBeGeneratedByAgent()) {
Path filePath = directoryPath.resolve(configFile.getFileName(CONFIG_WITH_ORIGINS_FILE_SUFFIX));
try (JsonWriter writer = new JsonWriter(filePath)) {
rootNode.writeJson(writer, configFile);
}
writtenPaths.add(filePath);
}
}
return writtenPaths;
}
use of com.oracle.svm.core.configure.ConfigurationFile in project graal by oracle.
the class ConfigurationResultWriter method writeToDirectory.
@Override
public List<Path> writeToDirectory(Path directoryPath) throws IOException {
List<Path> writtenPaths = new ArrayList<>();
for (ConfigurationFile configFile : ConfigurationFile.values()) {
if (configFile.canBeGeneratedByAgent()) {
Path filePath = directoryPath.resolve(configFile.getFileName());
try (JsonWriter writer = new JsonWriter(filePath)) {
processor.getConfiguration(configFile).printJson(writer);
/* Add an extra EOF newline */
writer.newline();
}
writtenPaths.add(filePath);
}
}
return writtenPaths;
}
Aggregations