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 classConfigurationTransformation.BuilderBuilds a basicConfigurationTransformation.static classConfigurationTransformation.NodePathImplementation ofNodePathused by this class.static classConfigurationTransformation.VersionedBuilderBuilds a versionedConfigurationTransformation. -
Field Summary
Fields Modifier and Type Field Description static ObjectWILDCARD_OBJECTA 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 voidapply(@NonNull ConfigurationNode node)Apply this transformation to a given nodestatic @NonNull ConfigurationTransformation.Builderbuilder()Create a new builder to create a basic configuration transformation.static @NonNull ConfigurationTransformationchain(ConfigurationTransformation... transformations)Creates a chain ofConfigurationTransformations.static @NonNull ConfigurationTransformation.VersionedBuilderversionedBuilder()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
-
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 ofConfigurationTransformations.- Parameters:
transformations- The transformations- Returns:
- The resultant transformation chain
-
apply
Apply this transformation to a given node- Parameters:
node- The target node
-