Class Deserializers


  • public class Deserializers
    extends java.lang.Object
    Deserializer Utilities class
    Since:
    1.0.0
    Author:
    Mercy
    • Constructor Detail

      • Deserializers

        public Deserializers​(java.lang.ClassLoader classLoader)
      • Deserializers

        public Deserializers()
    • Method Detail

      • loadSPI

        public void loadSPI()
      • getMostCompatible

        public Deserializer<?> getMostCompatible​(java.lang.Class<?> deserializedType)
        Get the most compatible instance of Deserializer by the specified deserialized type
        Parameters:
        deserializedType - the type to be deserialized
        Returns:
        null if not found
      • getHighestPriority

        public <T> Deserializer<T> getHighestPriority​(java.lang.Class<?> deserializedType)
        Get the highest priority instance of Deserializer by the specified deserialized type
        Type Parameters:
        T - the type to be serialized
        Parameters:
        deserializedType - the type to be deserialized
        Returns:
        null if not found
      • getLowestPriority

        public <T> Deserializer<T> getLowestPriority​(java.lang.Class<?> deserializedType)
        Get the lowest priority instance of Deserializer by the specified deserialized type
        Type Parameters:
        T - the type to be serialized
        Parameters:
        deserializedType - the type to be deserialized
        Returns:
        null if not found
      • get

        public <T> java.util.List<Deserializer<T>> get​(java.lang.Class<?> deserializedType)
        Get all instances of Deserializer by the specified deserialized type
        Type Parameters:
        T - the type to be serialized
        Parameters:
        deserializedType - the type to be deserialized
        Returns:
        non-null List