Package io.microsphere.io
Class Serializers
- java.lang.Object
-
- io.microsphere.io.Serializers
-
public class Serializers extends java.lang.ObjectSerializerUtilities class- Since:
- 1.0.0
- Author:
- Mercy
-
-
Constructor Summary
Constructors Constructor Description Serializers()Serializers(java.lang.ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S> java.util.List<Serializer<S>>get(java.lang.Class<S> serializedType)Get all instances ofSerializerby the specified serialized type<S> Serializer<S>getHighestPriority(java.lang.Class<S> serializedType)Get the highest priority instance ofSerializerby the specified serialized type<S> Serializer<S>getLowestPriority(java.lang.Class<S> serializedType)Get the lowest priority instance ofSerializerby the specified serialized typeSerializer<?>getMostCompatible(java.lang.Class<?> serializedType)Get the most compatible instance ofSerializerby the specified deserialized typevoidloadSPI()
-
-
-
Method Detail
-
loadSPI
public void loadSPI()
-
getMostCompatible
public Serializer<?> getMostCompatible(java.lang.Class<?> serializedType)
Get the most compatible instance ofSerializerby the specified deserialized type- Parameters:
serializedType- the type to be serialized- Returns:
nullif not found
-
getHighestPriority
public <S> Serializer<S> getHighestPriority(java.lang.Class<S> serializedType)
Get the highest priority instance ofSerializerby the specified serialized type- Type Parameters:
S- the type to be serialized- Parameters:
serializedType- the type to be serialized- Returns:
nullif not found
-
getLowestPriority
public <S> Serializer<S> getLowestPriority(java.lang.Class<S> serializedType)
Get the lowest priority instance ofSerializerby the specified serialized type- Type Parameters:
S- the type to be serialized- Parameters:
serializedType- the type to be serialized- Returns:
nullif not found
-
get
public <S> java.util.List<Serializer<S>> get(java.lang.Class<S> serializedType)
Get all instances ofSerializerby the specified serialized type- Type Parameters:
S- the type to be serialized- Parameters:
serializedType- the type to be serialized- Returns:
- non-null
List
-
-