Enum YamlCommentFormat
- All Implemented Interfaces:
Serializable,Comparable<YamlCommentFormat>,java.lang.constant.Constable
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionBLANK_LINE comment format gets comments in a readable way stripping the # comment prefix and without indentation, but it keeps trailing spaces and blank lines.DEFAULT comment format gets comments in a readable way stripping the # comment prefix, without leading and trailing spaces or blank lines and without indentation.PRETTY comment format gets comments in a readable way stripping the # comment prefix, without leading and trailing spaces or blank lines and without indentation.RAW comment format gets comments as they are in the file configuration, with blank lines and the comment prefix with # character, but without the indentation prefix. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidreset()static YamlCommentFormatReturns the enum constant of this type with the specified name.static YamlCommentFormat[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
DEFAULT comment format gets comments in a readable way stripping the # comment prefix, without leading and trailing spaces or blank lines and without indentation. The prefix for setting new comments is:- BLOCK comments: "# ", i.e. a # followed by a space.
- SIDE comments: " # ", i.e. a space followed by # with a space.
If when setting a comment all lines are blank or already prefixed with a comment prefix # then it does not add additional formatting. -
PRETTY
PRETTY comment format gets comments in a readable way stripping the # comment prefix, without leading and trailing spaces or blank lines and without indentation. The prefix for setting new comments is:- BLOCK comments with 0 indentation (root keys) except first key: "\n# ", i.e. a blank line followed by # with a space. Multiline comments do not add additional blank lines.
- BLOCK comments with some indentation (child keys) or first key: "# ", i.e. a # followed by a space.
- SIDE comments: " # ", i.e. a space followed by # with a space.
If when setting a comment all lines are blank or already prefixed with a comment prefix # then it does not add additional formatting. -
BLANK_LINE
BLANK_LINE comment format gets comments in a readable way stripping the # comment prefix and without indentation, but it keeps trailing spaces and blank lines. The prefix for setting new comments is:- BLOCK comments: "\n# ", i.e. a blank line followed by # with a space. Multiline comments do not add additional blank lines.
- SIDE comments: "\n# ", i.e. a new line followed by # with a space. This will add the comment below.
If when setting a comment all lines are blank or already prefixed with a comment prefix # then it does not add additional formatting. -
RAW
RAW comment format gets comments as they are in the file configuration, with blank lines and the comment prefix with # character, but without the indentation prefix. The prefix for setting new comments is:- BLOCK comments: "# ", i.e. a # followed by a space.
- SIDE comments: " # ", i.e. a space followed by # with a space.
If when setting a comment all lines are blank or already prefixed with a comment prefix # then it does not add additional formatting.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
commentFormatter
-
reset
public static void reset()
-