Package 

Interface TypeReader

  • All Implemented Interfaces:
    java.lang.AutoCloseable

    
    public interface TypeReader<T extends Object>
     implements AutoCloseable
                        

    TypeReaders manage the process of assembling data into final objects. Type readers should have all the information needed to deserialize the data available. e.g. the user shouldn't have to call out to the type analyzer itself to get a list's element serializer, that should be present in the type reader.

    • Method Summary

      Modifier and Type Method Description
      abstract T build() Build a new object from the read data.
      abstract Unit release() Clears this reader's state and returns it to the TypeAnalyzer's pool
      Unit start() Starts the reader, potentially initializing state for a read
      Unit close()
      • Methods inherited from class java.lang.Object

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

      • build

         abstract T build()

        Build a new object from the read data. Calling this multiple times is considered a logic error and may throw an error or return corrupt/invalid data.

      • start

         Unit start()

        Starts the reader, potentially initializing state for a read