Package yapion.serializing.api
Interface InstanceFactoryInterface<T>
-
- All Known Implementing Classes:
InstanceFactory
public interface InstanceFactoryInterface<T>
-
-
Method Detail
-
type
java.lang.Class<T> type()
Describes the Class type this Factory creates instances of. This will be used by theYAPIONDeserializer
.- Returns:
- the Class Type this Factory is for
-
instance
T instance()
This should return an Instance of the desired class described bytype()
. Each time this method is called it should return a completely new instance because theYAPIONDeserializer
would destroy other instances otherwise.- Returns:
- the Object instance of type
type()
-
-