Class ConfigurationTransformation
java.lang.Object
ninja.leaping.configurate.transformation.ConfigurationTransformation
public abstract class ConfigurationTransformation extends Object
Represents a set of transformations on a configuration.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConfigurationTransformation.Builder
Builds a basicConfigurationTransformation
.static class
ConfigurationTransformation.NodePath
Implementation ofNodePath
used by this class.static class
ConfigurationTransformation.VersionedBuilder
Builds a versionedConfigurationTransformation
. -
Field Summary
Fields Modifier and Type Field Description static Object
WILDCARD_OBJECT
A special object that represents a wildcard in a path provided to a configuration transformer -
Constructor Summary
Constructors Constructor Description ConfigurationTransformation()
-
Method Summary
Modifier and Type Method Description abstract void
apply(@NonNull ConfigurationNode node)
Apply this transformation to a given nodestatic @NonNull ConfigurationTransformation.Builder
builder()
Create a new builder to create a basic configuration transformation.static @NonNull ConfigurationTransformation
chain(ConfigurationTransformation... transformations)
Creates a chain ofConfigurationTransformation
s.static @NonNull ConfigurationTransformation.VersionedBuilder
versionedBuilder()
This creates a builder for versioned transformations.
-
Field Details
-
WILDCARD_OBJECT
A special object that represents a wildcard in a path provided to a configuration transformer
-
-
Constructor Details
-
ConfigurationTransformation
public ConfigurationTransformation()
-
-
Method Details
-
builder
Create a new builder to create a basic configuration transformation.- Returns:
- a new transformation builder.
-
versionedBuilder
This creates a builder for versioned transformations.- Returns:
- A new builder for versioned transformations
-
chain
public static @NonNull ConfigurationTransformation chain(ConfigurationTransformation... transformations)Creates a chain ofConfigurationTransformation
s.- Parameters:
transformations
- The transformations- Returns:
- The resultant transformation chain
-
apply
Apply this transformation to a given node- Parameters:
node
- The target node
-