Class Serializers

java.lang.Object
de.exlll.configlib.Serializers

public final class Serializers extends Object
Class that contains static factory methods for the creation of Serializers.
  • Method Details

    • newConfigurationTypeSerializer

      public static <T> Serializer<T,Map<?,?>> newConfigurationTypeSerializer(Class<T> configurationType, ConfigurationProperties properties)
      Creates a new serializer that converts instances of the given configuration type to Maps of valid target types.

      The serializer returned by this method respects most configuration properties of the given properties object. The following properties are ignored:

      • All properties of subclasses of the configuration properties object
      • Properties affecting environment variable resolution
      Type Parameters:
      T - the configuration type
      Parameters:
      configurationType - the type of configurations the newly created serializer can convert
      properties - the configuration properties the serializer will use
      Returns:
      newly created serializer
      Throws:
      NullPointerException - if any argument is null
      ConfigurationException - if type is not a configuration type