Package io.microsphere.io
Class Deserializers
- java.lang.Object
-
- io.microsphere.io.Deserializers
-
public class Deserializers extends java.lang.Object
Deserializer
Utilities class- Since:
- 1.0.0
- Author:
- Mercy
-
-
Constructor Summary
Constructors Constructor Description Deserializers()
Deserializers(java.lang.ClassLoader classLoader)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.List<Deserializer<T>>
get(java.lang.Class<?> deserializedType)
Get all instances ofDeserializer
by the specified deserialized type<T> Deserializer<T>
getHighestPriority(java.lang.Class<?> deserializedType)
Get the highest priority instance ofDeserializer
by the specified deserialized type<T> Deserializer<T>
getLowestPriority(java.lang.Class<?> deserializedType)
Get the lowest priority instance ofDeserializer
by the specified deserialized typeDeserializer<?>
getMostCompatible(java.lang.Class<?> deserializedType)
Get the most compatible instance ofDeserializer
by the specified deserialized typevoid
loadSPI()
-
-
-
Method Detail
-
loadSPI
public void loadSPI()
-
getMostCompatible
public Deserializer<?> getMostCompatible(java.lang.Class<?> deserializedType)
Get the most compatible instance ofDeserializer
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 ofDeserializer
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 ofDeserializer
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 ofDeserializer
by the specified deserialized type- Type Parameters:
T
- the type to be serialized- Parameters:
deserializedType
- the type to be deserialized- Returns:
- non-null
List
-
-