use of org.yaml.snakeyaml.Loader in project eiger by wlloyd.
the class CliClient method loadHelp.
private CliUserHelp loadHelp() {
final InputStream is = CliClient.class.getClassLoader().getResourceAsStream("org/apache/cassandra/cli/CliHelp.yaml");
assert is != null;
try {
final Constructor constructor = new Constructor(CliUserHelp.class);
TypeDescription desc = new TypeDescription(CliUserHelp.class);
desc.putListPropertyType("commands", CliCommandHelp.class);
final Yaml yaml = new Yaml(new Loader(constructor));
return (CliUserHelp) yaml.load(is);
} finally {
FileUtils.closeQuietly(is);
}
}
Aggregations