Package examples

Class CustomTranslatorExample.JavaSerializerTranslator<T>

  • All Implemented Interfaces:
    Enclosing class:

    public static class CustomTranslatorExample.JavaSerializerTranslator<T>
    extends java.lang.Object
    implements Translator<,​T>
    Translates binary data to entity instances using Java standard serialization. Alternatively, you can use Translator.define(Function, Class, Class) for translator creation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Class<> inputType()  
      java.lang.Class<T> outputType()  
      T translate​( resource)
      Performs the actual translation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JavaSerializerTranslator

        public JavaSerializerTranslator​(java.lang.Class<T> type)
    • Method Detail

      • translate

        public T translate​( resource)
        Description copied from interface: Translator
        Performs the actual translation.
        Specified by:
        translate in interface Translator<,​T>
        resource - input resource
        translated instance
      • inputType

        public java.lang.Class<> inputType()
        Specified by:
        inputType in interface Translator<,​T>
        input T class
      • outputType

        public java.lang.Class<T> outputType()
        Specified by:
        outputType in interface Translator<,​T>
        output R class