Package de.exlll.configlib
Class ConfigurationProperties
java.lang.Object
de.exlll.configlib.ConfigurationProperties
- Direct Known Subclasses:
FileConfigurationProperties
A collection of values used to configure the serialization of configurations.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder class for constructingConfigurationProperties. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructs a new instance of this class with values taken from the given builder. -
Method Summary
Modifier and TypeMethodDescriptionfinal FieldFilterReturns the field filter used to filter the fields of a configuration class.final NameFormatterReturns the name formatter used to format the names of configuration elements.final Map<Predicate<? super ConfigurationElement<?>>,UnaryOperator<?>> Returns an unmodifiable map of post-processors by condition.final Map<Class<?>,Function<? super SerializerContext, ? extends Serializer<?, ?>>> Returns an unmodifiable map of serializer factories by type.final Map<Class<?>,Serializer<?, ?>> Returns an unmodifiable map of serializers by type.final booleanReturns whether null values should be allowed as input.static ConfigurationProperties.Builder<?>Constructs a newBuilderwith default values.final booleanReturns whether null values should be output.Creates a new builder and initializes it with values taken from this properties object.
-
Constructor Details
-
ConfigurationProperties
Constructs a new instance of this class with values taken from the given builder.- Parameters:
builder- the builder used to initialize the fields of this class- Throws:
NullPointerException- if the builder or any of its values is null
-
-
Method Details
-
newBuilder
Constructs a newBuilderwith default values.- Returns:
- newly constructed
Builder
-
toBuilder
Creates a new builder and initializes it with values taken from this properties object.- Returns:
- new builder
-
getFieldFilter
Returns the field filter used to filter the fields of a configuration class.- Returns:
- the field filter
-
getNameFormatter
Returns the name formatter used to format the names of configuration elements.- Returns:
- the formatter
-
getSerializers
Returns an unmodifiable map of serializers by type. The serializers returned by this method take precedence over any default serializers provided by this library.- Returns:
- serializers by type
-
getSerializerFactories
public final Map<Class<?>,Function<? super SerializerContext, getSerializerFactories()? extends Serializer<?, ?>>> Returns an unmodifiable map of serializer factories by type. The serializers created by the factories take precedence over any default serializers provided by this library.- Returns:
- serializer factories by type
-
getPostProcessorsByCondition
public final Map<Predicate<? super ConfigurationElement<?>>,UnaryOperator<?>> getPostProcessorsByCondition()Returns an unmodifiable map of post-processors by condition.- Returns:
- post-processors by condition
-
outputNulls
public final boolean outputNulls()Returns whether null values should be output.- Returns:
- whether to output null values
-
inputNulls
public final boolean inputNulls()Returns whether null values should be allowed as input.- Returns:
- whether to input null values
-