Class DataFixerTransformation
java.lang.Object
org.spongepowered.configurate.extra.dfu.v3.DataFixerTransformation
- All Implemented Interfaces:
- ConfigurationTransformation,- ConfigurationTransformation.Versioned
public final class DataFixerTransformation
extends Object
implements ConfigurationTransformation.Versioned
A transformation that exposes a single DataFixer to a configuration in a
 friendly way.
 
Because Configurate does not have a schema model and DFU does, this transformation works by explicitly providing a mapping between configurate node paths and DFU TypeReferences.
- Since:
- 4.0.0
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformationConfigurationTransformation.Versioned, ConfigurationTransformation.VersionedBuilder
- 
Field SummaryFields inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformationWILDCARD_OBJECTFields inherited from interface org.spongepowered.configurate.transformation.ConfigurationTransformation.VersionedVERSION_UNKNOWN
- 
Method SummaryModifier and TypeMethodDescriptionvoidapply(@NonNull ConfigurationNode node) Apply this transformation to a given node.Create a builder that can work with any DFU DataFixer.intGet the latest version that nodes can be updated to.intversion(ConfigurationNode root) Get the version from a specific configuration node, using the configured version key.Get the path the node's current version is located at.
- 
Method Details- 
dfuBuilderCreate a builder that can work with any DFU DataFixer.- Returns:
- the builder
- Since:
- 4.0.0
 
- 
applyDescription copied from interface:ConfigurationTransformationApply this transformation to a given node.- Specified by:
- applyin interface- ConfigurationTransformation
- Parameters:
- node- the target node
- Throws:
- ConfigurateException
 
- 
versionGet the version from a specific configuration node, using the configured version key.- Specified by:
- versionin interface- ConfigurationTransformation.Versioned
- Parameters:
- root- base node to query
- Returns:
- version, or -1 if this node is unversioned.
 
- 
versionKeyDescription copied from interface:ConfigurationTransformation.VersionedGet the path the node's current version is located at.- Specified by:
- versionKeyin interface- ConfigurationTransformation.Versioned
- Returns:
- version path
 
- 
latestVersionDescription copied from interface:ConfigurationTransformation.VersionedGet the latest version that nodes can be updated to.- Specified by:
- latestVersionin interface- ConfigurationTransformation.Versioned
- Returns:
- the most recent version
 
 
-