Class YamlFormat
java.lang.Object
dev.siroshun.configapi.format.yaml.YamlFormat
- All Implemented Interfaces:
FileFormat<MapNode>
A
FileFormat implementation that loading/saving MapNode from/to yaml files.
Supported Nodes:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final YamlFormatAn instance ofYamlFormatthat processes the comments.static final YamlFormatAn instance of defaultYamlFormat. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.siroshun.configapi.core.file.FileFormat
load, load, save, save
-
Field Details
-
DEFAULT
An instance of defaultYamlFormat. -
COMMENT_PROCESSING
An instance ofYamlFormatthat processes the comments.
-
-
Method Details
-
builder
Creates a newYamlFormat.Builder.- Returns:
- a new
YamlFormat.Builder
-
load
Description copied from interface:FileFormatLoads a node from aReader.- Specified by:
loadin interfaceFileFormat<MapNode>- Parameters:
reader- aReaderto load a node- Returns:
- a loaded
Node(FileFormat) - Throws:
IOException- if I/O error occurred
-
save
public void save(@NotNull @NotNull MapNode node, @NotNull @NotNull Writer writer) throws IOException Description copied from interface:FileFormatSaves a node to aWriter.- Specified by:
savein interfaceFileFormat<MapNode>- Parameters:
node- a rootNode(FileFormat) to savewriter- aWriterto write a node- Throws:
IOException- if I/O error occurred
-