public class SnakeYamlImplementation extends YamlImplementationCommentable
YamlConfigurationOptions.useComments()
is enabled.Modifier and Type | Field and Description |
---|---|
protected org.yaml.snakeyaml.DumperOptions |
dumperOptions |
protected org.yaml.snakeyaml.LoaderOptions |
loaderOptions |
protected org.yaml.snakeyaml.resolver.Resolver |
resolver |
protected org.yaml.snakeyaml.Yaml |
yaml |
protected SnakeYamlConstructor |
yamlConstructor |
protected SnakeYamlRepresenter |
yamlRepresenter |
options, yamlCommentMapper
Constructor and Description |
---|
SnakeYamlImplementation() |
SnakeYamlImplementation(org.yaml.snakeyaml.LoaderOptions loaderOptions,
org.yaml.snakeyaml.DumperOptions dumperOptions) |
SnakeYamlImplementation(SnakeYamlConstructor yamlConstructor,
SnakeYamlRepresenter yamlRepresenter) |
SnakeYamlImplementation(SnakeYamlConstructor yamlConstructor,
SnakeYamlRepresenter yamlRepresenter,
org.yaml.snakeyaml.resolver.Resolver resolver) |
SnakeYamlImplementation(SnakeYamlRepresenter yamlRepresenter) |
Modifier and Type | Method and Description |
---|---|
void |
configure(YamlConfigurationOptions options)
Apply the configuration options to this implementation.
|
void |
dump(Writer writer,
org.simpleyaml.configuration.ConfigurationSection section)
Dump section values to Yaml.
|
protected void |
dumpYaml(Writer writer,
org.simpleyaml.configuration.ConfigurationSection section) |
SnakeYamlConstructor |
getConstructor() |
org.yaml.snakeyaml.DumperOptions |
getDumperOptions() |
org.yaml.snakeyaml.LoaderOptions |
getLoaderOptions() |
protected String |
getName(org.yaml.snakeyaml.nodes.Node node,
boolean key) |
SnakeYamlRepresenter |
getRepresenter() |
org.yaml.snakeyaml.resolver.Resolver |
getResolver() |
org.yaml.snakeyaml.Yaml |
getYaml() |
protected boolean |
hasContent(Writer writer,
org.simpleyaml.configuration.ConfigurationSection section) |
void |
load(Reader reader,
org.simpleyaml.configuration.ConfigurationSection section)
Load Yaml to a configuration section.
|
protected static org.yaml.snakeyaml.nodes.Node |
resolveAnchor(org.yaml.snakeyaml.nodes.Node node) |
protected org.yaml.snakeyaml.nodes.MappingNode |
sectionToMapping(org.simpleyaml.configuration.ConfigurationSection section,
org.simpleyaml.configuration.comments.KeyTree.Node node,
SnakeYamlCommentMapper yamlCommentMapper) |
void |
setComment(String path,
String comment,
org.simpleyaml.configuration.comments.CommentType type) |
protected void |
setCommentsMapping(org.yaml.snakeyaml.nodes.MappingNode mapping,
org.simpleyaml.configuration.comments.KeyTree.Node node,
SnakeYamlCommentMapper yamlCommentMapper) |
protected void |
setCommentsSequence(org.yaml.snakeyaml.nodes.SequenceNode sequence,
org.simpleyaml.configuration.comments.KeyTree.Node node,
SnakeYamlCommentMapper yamlCommentMapper) |
protected void |
trackMapping(org.yaml.snakeyaml.nodes.MappingNode node,
org.simpleyaml.configuration.ConfigurationSection section,
org.simpleyaml.configuration.comments.KeyTree.Node parent,
SnakeYamlCommentMapper yamlCommentMapper) |
protected void |
trackSequence(org.yaml.snakeyaml.nodes.SequenceNode node,
org.simpleyaml.configuration.comments.KeyTree.Node parent,
SnakeYamlCommentMapper yamlCommentMapper) |
getComment, getCommentMapper
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
dump, load, load
protected final SnakeYamlConstructor yamlConstructor
protected final SnakeYamlRepresenter yamlRepresenter
protected final org.yaml.snakeyaml.DumperOptions dumperOptions
protected final org.yaml.snakeyaml.LoaderOptions loaderOptions
protected final org.yaml.snakeyaml.resolver.Resolver resolver
protected final org.yaml.snakeyaml.Yaml yaml
public SnakeYamlImplementation()
public SnakeYamlImplementation(org.yaml.snakeyaml.LoaderOptions loaderOptions, org.yaml.snakeyaml.DumperOptions dumperOptions)
public SnakeYamlImplementation(SnakeYamlRepresenter yamlRepresenter)
public SnakeYamlImplementation(SnakeYamlConstructor yamlConstructor, SnakeYamlRepresenter yamlRepresenter)
public SnakeYamlImplementation(SnakeYamlConstructor yamlConstructor, SnakeYamlRepresenter yamlRepresenter, org.yaml.snakeyaml.resolver.Resolver resolver)
public org.yaml.snakeyaml.Yaml getYaml()
public SnakeYamlConstructor getConstructor()
public SnakeYamlRepresenter getRepresenter()
public org.yaml.snakeyaml.DumperOptions getDumperOptions()
public org.yaml.snakeyaml.LoaderOptions getLoaderOptions()
public org.yaml.snakeyaml.resolver.Resolver getResolver()
public void load(Reader reader, org.simpleyaml.configuration.ConfigurationSection section) throws IOException, org.simpleyaml.exceptions.InvalidConfigurationException
YamlImplementation
reader
- a reader of Yaml contents to loadsection
- the configuration to fill with the contentsIOException
- if cannot read contents.org.simpleyaml.exceptions.InvalidConfigurationException
- if contents is not a valid Yaml configurationpublic void dump(Writer writer, org.simpleyaml.configuration.ConfigurationSection section) throws IOException
YamlImplementation
writer
- writer to dump valuessection
- section with values to dumpIOException
protected void dumpYaml(Writer writer, org.simpleyaml.configuration.ConfigurationSection section) throws IOException
IOException
protected boolean hasContent(Writer writer, org.simpleyaml.configuration.ConfigurationSection section) throws IOException
IOException
public void configure(YamlConfigurationOptions options)
YamlImplementation
configure
in interface YamlImplementation
configure
in class YamlImplementationCommentable
options
- yaml optionspublic void setComment(String path, String comment, org.simpleyaml.configuration.comments.CommentType type)
setComment
in interface org.simpleyaml.configuration.comments.Commentable
setComment
in class YamlImplementationCommentable
protected void trackMapping(org.yaml.snakeyaml.nodes.MappingNode node, org.simpleyaml.configuration.ConfigurationSection section, org.simpleyaml.configuration.comments.KeyTree.Node parent, SnakeYamlCommentMapper yamlCommentMapper)
protected void trackSequence(org.yaml.snakeyaml.nodes.SequenceNode node, org.simpleyaml.configuration.comments.KeyTree.Node parent, SnakeYamlCommentMapper yamlCommentMapper)
protected org.yaml.snakeyaml.nodes.MappingNode sectionToMapping(org.simpleyaml.configuration.ConfigurationSection section, org.simpleyaml.configuration.comments.KeyTree.Node node, SnakeYamlCommentMapper yamlCommentMapper)
protected void setCommentsSequence(org.yaml.snakeyaml.nodes.SequenceNode sequence, org.simpleyaml.configuration.comments.KeyTree.Node node, SnakeYamlCommentMapper yamlCommentMapper)
protected void setCommentsMapping(org.yaml.snakeyaml.nodes.MappingNode mapping, org.simpleyaml.configuration.comments.KeyTree.Node node, SnakeYamlCommentMapper yamlCommentMapper)
protected String getName(org.yaml.snakeyaml.nodes.Node node, boolean key)
protected static org.yaml.snakeyaml.nodes.Node resolveAnchor(org.yaml.snakeyaml.nodes.Node node)
Copyright © 2023. All rights reserved.