public interface CommentFormatter
Modifier and Type | Method and Description |
---|---|
default String |
dump(String comment) |
default String |
dump(String comment,
CommentType type) |
String |
dump(String comment,
CommentType type,
KeyTree.Node node)
Given a comment returns the raw-formatted string to be dumped somewhere like a file.
|
static String |
format(int indent,
String comment,
CommentType type,
CommentFormatterConfiguration configuration) |
static String |
format(int indent,
String prefixFirst,
String prefixMultiline,
String comment,
CommentType type,
String suffixMultiline,
String suffixLast) |
static String |
format(String prefixFirst,
String prefixMultiline,
String comment,
String suffixMultiline,
String suffixLast) |
default String |
parse(Reader raw) |
default String |
parse(Reader raw,
CommentType type) |
String |
parse(Reader raw,
CommentType type,
KeyTree.Node node)
Parse the comment from a reader that may contain a raw-formatted comment (for instance from a configuration file)
to a human-friendly contentful representation of that comment.
|
default String |
parse(String raw) |
default String |
parse(String raw,
CommentType type) |
default String |
parse(String raw,
CommentType type,
KeyTree.Node node)
Parse the comment from a string that may contain a raw-formatted comment (for instance from a configuration file)
to a human-friendly contentful representation of that comment.
|
String parse(Reader raw, CommentType type, KeyTree.Node node) throws IOException
raw
- the comment to parse that may contain special format characters with leading and trailing spacetype
- the comment typenode
- the comment nodeIOException
- if comment cannot be parsedString dump(String comment, CommentType type, KeyTree.Node node)
comment
- the comment to be dumpedtype
- the comment typenode
- the comment nodedefault String parse(String raw, CommentType type, KeyTree.Node node) throws IOException
raw
- the comment to parse that may contain special format characters with leading and trailing spacetype
- the comment typenode
- the comment nodeIOException
default String parse(Reader raw, CommentType type) throws IOException
IOException
default String parse(String raw, CommentType type) throws IOException
IOException
default String parse(Reader raw) throws IOException
IOException
default String parse(String raw) throws IOException
IOException
default String dump(String comment, CommentType type)
static String format(int indent, String prefixFirst, String prefixMultiline, String comment, CommentType type, String suffixMultiline, String suffixLast)
static String format(String prefixFirst, String prefixMultiline, String comment, String suffixMultiline, String suffixLast)
static String format(int indent, String comment, CommentType type, CommentFormatterConfiguration configuration)
Copyright © 2023. All rights reserved.