Class Deserializer


  • public final class Deserializer
    extends Object
    The Deserializer takes a target Class and a Map to create a new object of the given class based on the data contained Map.
    See Also:
    EventMaid Documentation
    • Constructor Detail

      • Deserializer

        public Deserializer()
    • Method Detail

      • deserializer

        public static Deserializer deserializer​(FilterMap<Class<?>,​Object,​Demapifier<?>> requestMappers)
        Creates a new Deserializer from the given FilterMap.
        Parameters:
        requestMappers - the FilterMap to be used as deserializers
        Returns:
        a new Deserializer
      • deserialize

        public <T> T deserialize​(Class<T> type,
                                 Object map)
        Creates a new object of the given Class from the data contained in the Map.
        Type Parameters:
        T - the type of the object to be created
        Parameters:
        type - the type of the object to be created
        map - the Map containing necessary data
        Returns:
        the newly created object