Class PrettyYamlCommentFormatter
java.lang.Object
org.simpleyaml.configuration.comments.format.YamlCommentFormatter
org.simpleyaml.configuration.comments.format.PrettyYamlCommentFormatter
- All Implemented Interfaces:
CommentFormatter
YamlCommentFormat.PRETTY formatter-
Field Summary
Fields inherited from class org.simpleyaml.configuration.comments.format.YamlCommentFormatter
blockFormatter, sideFormatter -
Constructor Summary
ConstructorsConstructorDescriptionPrettyYamlCommentFormatter(YamlCommentFormatterConfiguration blockFormatter) PrettyYamlCommentFormatter(YamlCommentFormatterConfiguration blockFormatter, YamlSideCommentFormatterConfiguration sideFormatter) -
Method Summary
Modifier and TypeMethodDescriptiondump(String comment, CommentType type, KeyTree.Node node) Given a comment returns the raw-formatted string to be dumped somewhere like a file.Methods inherited from class org.simpleyaml.configuration.comments.format.YamlCommentFormatter
blockFormatter, equals, formatterConfiguration, hashCode, parse, parseCommentLine, sideFormatter, stripPrefix, toString, trim
-
Constructor Details
-
PrettyYamlCommentFormatter
public PrettyYamlCommentFormatter() -
PrettyYamlCommentFormatter
-
PrettyYamlCommentFormatter
public PrettyYamlCommentFormatter(YamlCommentFormatterConfiguration blockFormatter, YamlSideCommentFormatterConfiguration sideFormatter)
-
-
Method Details
-
dump
Description copied from interface:CommentFormatterGiven a comment returns the raw-formatted string to be dumped somewhere like a file.- Specified by:
dumpin interfaceCommentFormatter- Overrides:
dumpin classYamlCommentFormatter- Parameters:
comment- the comment to be dumpedtype- the comment typenode- the comment node- Returns:
- the raw-formatted comment string to be dumped, for instance to a configuration file
-