Package yapion.serializing.utils
Class SerializeManagerUtils
- java.lang.Object
-
- yapion.serializing.utils.SerializeManagerUtils
-
public class SerializeManagerUtils extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
SerializeManagerUtils.DeserializationGetter<T,R extends YAPIONAnyType>
static interface
SerializeManagerUtils.InstanceGetter<T>
static interface
SerializeManagerUtils.SerializationGetter<T,R extends YAPIONAnyType>
-
Method Summary
-
-
-
Method Detail
-
SerializerObject
public static <T> SerializerObject<T> SerializerObject(java.lang.Class<T> clazz, SerializeManagerUtils.SerializationGetter<T,YAPIONObject> serializationGetter, SerializeManagerUtils.DeserializationGetter<T,YAPIONObject> deserializationGetter)
Create aSerializerQueue
from two interfaces:SerializeManagerUtils.SerializationGetter
andSerializeManagerUtils.DeserializationGetter
. Those are all FunctionalInterfaces with just one method to override. This makes the use off those interfaces really easy. If any of the three arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Type of this Serializer- Parameters:
clazz
- the ClassserializationGetter
- the SerializationGetterdeserializationGetter
- the DeserializationGetter- Returns:
- the Serializer that wraps the Interfaces
-
SerializerMap
public static <T extends java.util.Map<?,?>> SerializerMap<T> SerializerMap(java.lang.Class<T> clazz, SerializeManagerUtils.SerializationGetter<T,YAPIONMap> serializationGetter, SerializeManagerUtils.DeserializationGetter<T,YAPIONMap> deserializationGetter)
Create aSerializerMap
from two interfaces:SerializeManagerUtils.SerializationGetter
andSerializeManagerUtils.DeserializationGetter
. Those are all FunctionalInterfaces with just one method to override. This makes the use off those interfaces really easy. If any of the three arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Type of this Serializer- Parameters:
clazz
- the ClassserializationGetter
- the SerializationGetterdeserializationGetter
- the DeserializationGetter- Returns:
- the Serializer that wraps the Interfaces
-
SerializerList
public static <T extends java.util.List<?>> SerializerList<T> SerializerList(java.lang.Class<T> clazz, SerializeManagerUtils.SerializationGetter<T,YAPIONArray> serializationGetter, SerializeManagerUtils.DeserializationGetter<T,YAPIONArray> deserializationGetter)
Create aSerializerList
from two interfaces:SerializeManagerUtils.SerializationGetter
andSerializeManagerUtils.DeserializationGetter
. Those are all FunctionalInterfaces with just one method to override. This makes the use off those interfaces really easy. If any of the three arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Type of this Serializer- Parameters:
clazz
- the ClassserializationGetter
- the SerializationGetterdeserializationGetter
- the DeserializationGetter- Returns:
- the Serializer that wraps the Interfaces
-
SerializerQueue
public static <T extends java.util.Queue<?>> SerializerQueue<T> SerializerQueue(java.lang.Class<T> clazz, SerializeManagerUtils.SerializationGetter<T,YAPIONArray> serializationGetter, SerializeManagerUtils.DeserializationGetter<T,YAPIONArray> deserializationGetter)
Create aSerializerQueue
from two interfaces:SerializeManagerUtils.SerializationGetter
andSerializeManagerUtils.DeserializationGetter
. Those are all FunctionalInterfaces with just one method to override. This makes the use off those interfaces really easy. If any of the three arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Type of this Serializer- Parameters:
clazz
- the ClassserializationGetter
- the SerializationGetterdeserializationGetter
- the DeserializationGetter- Returns:
- the Serializer that wraps the Interfaces
-
SerializerSet
public static <T extends java.util.Set<?>> SerializerSet<T> SerializerSet(java.lang.Class<T> clazz, SerializeManagerUtils.SerializationGetter<T,YAPIONArray> serializationGetter, SerializeManagerUtils.DeserializationGetter<T,YAPIONArray> deserializationGetter)
Create aSerializerSet
from two interfaces:SerializeManagerUtils.SerializationGetter
andSerializeManagerUtils.DeserializationGetter
. Those are all FunctionalInterfaces with just one method to override. This makes the use off those interfaces really easy. If any of the three arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Type of this Serializer- Parameters:
clazz
- the ClassserializationGetter
- the SerializationGetterdeserializationGetter
- the DeserializationGetter- Returns:
- the Serializer that wraps the Interfaces
-
InstanceFactory
public static <T> InstanceFactory<T> InstanceFactory(java.lang.Class<T> clazz, SerializeManagerUtils.InstanceGetter<T> instanceGetter)
Create aInstanceFactory
from one interface:SerializeManagerUtils.InstanceGetter
Which is a FunctionalInterface with just one method to override. This makes the use off this interface really easy. If any of the two arguments arenull
an YAPIONException is thrown.- Type Parameters:
T
- the Instance type- Parameters:
clazz
- the ClassinstanceGetter
- the InstanceGetter- Returns:
- the InstanceFactory that wraps the Interface
-
-