Interface ConfigurationTransformation
-
- All Known Subinterfaces:
ConfigurationTransformation.Versioned
- All Known Implementing Classes:
DataFixerTransformation
,DataFixerTransformation
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface ConfigurationTransformation
Represents a set of transformations on a configuration.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ConfigurationTransformation.Builder
Builds a basicConfigurationTransformation
.static interface
ConfigurationTransformation.Versioned
A transformation that is aware of node versions.static class
ConfigurationTransformation.VersionedBuilder
Builds a versionedConfigurationTransformation
.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.Object
WILDCARD_OBJECT
A special object that represents a wildcard in a path provided to a configuration transformer.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description void
apply(ConfigurationNode node)
Apply this transformation to a given node.static ConfigurationTransformation.Builder
builder()
Create a new builder to create a basic configuration transformation.static ConfigurationTransformation
chain(ConfigurationTransformation... transformations)
Creates a chain ofConfigurationTransformation
s.static ConfigurationTransformation
empty()
Get an empty transformation.static ConfigurationTransformation.VersionedBuilder
versionedBuilder()
This creates a builder for versioned transformations.
-
-
-
Field Detail
-
WILDCARD_OBJECT
static final java.lang.Object WILDCARD_OBJECT
A special object that represents a wildcard in a path provided to a configuration transformer.- Since:
- 4.0.0
-
-
Method Detail
-
empty
static ConfigurationTransformation empty()
Get an empty transformation.This transformation will perform no actions.
- Returns:
- empty transformation
- Since:
- 4.0.0
-
builder
static ConfigurationTransformation.Builder builder()
Create a new builder to create a basic configuration transformation.- Returns:
- a new transformation builder.
- Since:
- 4.0.0
-
versionedBuilder
static ConfigurationTransformation.VersionedBuilder versionedBuilder()
This creates a builder for versioned transformations.- Returns:
- a new builder for versioned transformations
- Since:
- 4.0.0
-
chain
static ConfigurationTransformation chain(ConfigurationTransformation... transformations)
Creates a chain ofConfigurationTransformation
s.- Parameters:
transformations
- the transformations- Returns:
- a new transformation chain
- Since:
- 4.0.0
-
apply
void apply(ConfigurationNode node) throws ConfigurateException
Apply this transformation to a given node.- Parameters:
node
- the target node- Throws:
ConfigurateException
- Since:
- 4.0.0
-
-