Class ConfigurationProperties

java.lang.Object
de.exlll.configlib.ConfigurationProperties
Direct Known Subclasses:
FileConfigurationProperties

public class ConfigurationProperties extends Object
A collection of values used to configure the serialization of configurations.
  • Constructor Details

    • ConfigurationProperties

      protected ConfigurationProperties(ConfigurationProperties.Builder<?> builder)
      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

      public static ConfigurationProperties.Builder<?> newBuilder()
      Constructs a new Builder with default values.
      Returns:
      newly constructed Builder
    • toBuilder

      public ConfigurationProperties.Builder<?> toBuilder()
      Creates a new builder and initializes it with values taken from this properties object.
      Returns:
      new builder
    • getFieldFilter

      public final FieldFilter getFieldFilter()
      Returns the field filter used to filter the fields of a configuration class.
      Returns:
      the field filter
    • getNameFormatter

      public final NameFormatter getNameFormatter()
      Returns the name formatter used to format the names of configuration elements.
      Returns:
      the formatter
    • getSerializers

      public final Map<Class<?>,Serializer<?,?>> 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,? extends Serializer<?,?>>> getSerializerFactories()
      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