Package de.exlll.configlib
Class Serializers
java.lang.Object
de.exlll.configlib.Serializers
Class that contains static factory methods for the creation of
Serializers.-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Serializer<T, Map<?, ?>> newConfigurationTypeSerializer(Class<T> configurationType, ConfigurationProperties properties) Creates a new serializer that converts instances of the given configuration type toMaps of valid target types.
-
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 toMaps 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 convertproperties- the configuration properties the serializer will use- Returns:
- newly created serializer
- Throws:
NullPointerException- if any argument is nullConfigurationException- iftypeis not a configuration type
-