Interface InstanceFactoryInterface<T>

  • All Known Implementing Classes:
    InstanceFactory

    public interface InstanceFactoryInterface<T>
    • Method Summary

      Modifier and Type Method Description
      T instance()
      This should return an Instance of the desired class described by type().
      java.lang.Class<T> type()
      Describes the Class type this Factory creates instances of.
    • Method Detail

      • type

        java.lang.Class<T> type()
        Describes the Class type this Factory creates instances of. This will be used by the YAPIONDeserializer.
        Returns:
        the Class Type this Factory is for
      • instance

        T instance()
        This should return an Instance of the desired class described by type(). Each time this method is called it should return a completely new instance because the YAPIONDeserializer would destroy other instances otherwise.
        Returns:
        the Object instance of type type()