Package

com.avsystem.commons

serialization

Permalink

package serialization

Visibility
  1. Public
  2. All

Type Members

  1. abstract class ApplyUnapplyCodec[T] extends OOOFieldsObjectCodec[T] with ErrorReportingCodec[T]

    Permalink
  2. final class DefaultCaseObjectInput extends ObjectInput

    Permalink
  3. trait ErrorReportingCodec[T] extends GenCodec[T]

    Permalink
  4. trait FieldInput extends Input

    Permalink

    An Input representing an object field.

    An Input representing an object field. The same as Input but also provides field name.

  5. final class FieldValues extends AnyRef

    Permalink
  6. abstract class FlatSealedHierarchyCodec[T] extends SealedHierarchyCodec[T]

    Permalink
  7. case class GenCaseInfo[T](flags: TypeFlags, sourceName: String, annotName: commons.Opt[name], transparent: Boolean, defaultCase: Boolean) extends GenCodecStructure[T] with Product with Serializable

    Permalink
    Annotations
    @positioned( positioned.here )
  8. trait GenCodec[T] extends AnyRef

    Permalink

    Type class for types that can be serialized to Output (format-agnostic "output stream") and deserialized from Input (format-agnostic "input stream").

    Type class for types that can be serialized to Output (format-agnostic "output stream") and deserialized from Input (format-agnostic "input stream"). GenCodec is supposed to capture generic structure of serialized objects, without being bound to particular format like JSON. The actual format is determined by implementation of Input and Output.

    There are convenient macros for automatic derivation of GenCodec instances (materialize and materializeRecursively). However, GenCodec instances still need to be explicitly declared and won't be derived "automagically".

    Annotations
    @implicitNotFound( "No GenCodec found for ${T}" )
  9. sealed trait GenCodecStructure[T] extends GenInfo[T]

    Permalink
  10. sealed trait GenInfo[T] extends TypedMetadata[T]

    Permalink
  11. trait GenKeyCodec[T] extends AnyRef

    Permalink

    Typeclass which implements two-directional conversion between values of some type and field names used in ObjectOutput.writeField and ObjectInput.nextField (FieldInput.fieldName).

    Typeclass which implements two-directional conversion between values of some type and field names used in ObjectOutput.writeField and ObjectInput.nextField (FieldInput.fieldName). Every type which has a natural, unambiguous string representation should have a GenKeyCodec.

    Annotations
    @implicitNotFound( ... )
  12. case class GenParamInfo[T](sourceName: String, annotName: commons.Opt[name], hasWhenAbsent: Boolean, transientDefault: Boolean, outOfOrder: Boolean, flags: ParamFlags) extends GenInfo[T] with Product with Serializable

    Permalink
  13. case class GenRef[-S, +T](fun: (S) ⇒ T, rawRef: RawRef) extends Product with Serializable

    Permalink
  14. case class GenUnionInfo[T](flags: TypeFlags, sourceName: String, annotName: commons.Opt[name], flatten: commons.Opt[flatten]) extends GenCodecStructure[T] with Product with Serializable

    Permalink
    Annotations
    @positioned( positioned.here )
  15. abstract class HasGenCodec[T] extends AnyRef

    Permalink

    Convenience abstract class for companion objects of types that have a GenCodec.

  16. trait Input extends Any

    Permalink

    Represents an abstract source from which a value may be deserialized (read).

    Represents an abstract source from which a value may be deserialized (read). Each of the read methods tries to read a value of specified type and may throw an exception (usually ReadFailure) when reading is not successful.

    An Input value should be assumed to be stateful. If any of the readX methods have already been called, the Input instance can no longer be used and MUST be discarded.

    In order to ignore the value kept in this Input, skip() MUST be called.

    In summary: every Input MUST be fully exhausted by either calling one of the read methods which returns successful value or by calling skip(). Also, ListInput and ObjectInput instances returned from this Input must also be fully exhausted on their own.

  17. trait ListInput extends SequentialInput

    Permalink

    Represents an abstract source of sequence of values that can be deserialized.

    Represents an abstract source of sequence of values that can be deserialized. ListInput instance is stateful and MUST be read strictly sequentially. This means, you MUST fully exhaust an Input instance returned by nextElement() before calling nextElement() again. For this reason, ListInput is not an Iterator despite having similar interface (Iterator would easily allow e.g. conversion to List[Input] which would be illegal).

    ListInput MUST always be fully exhausted. In order to ignore any remaining elements, skipRemaining() may be used.

  18. trait ListOutput extends SequentialOutput

    Permalink

    Represents an abstract sink for serialization of sequences of values.

    Represents an abstract sink for serialization of sequences of values. Any ListOutput instance must be assumed to be stateful and used in strictly sequential manner. After all elements have been written, finish() must be called to explicitly mark that the list is complete.

  19. abstract class NestedSealedHierarchyCodec[T] extends SealedHierarchyCodec[T]

    Permalink
  20. trait ObjectInput extends SequentialInput

    Permalink

    Represents an abstract source of key-value mappings that can be deserialized.

    Represents an abstract source of key-value mappings that can be deserialized. ObjectInput instance is stateful and MUST be read strictly sequentially. This means, you MUST fully exhaust any Input instance returned by nextField() before calling nextField() again. For this reason, ObjectInput is not an Iterator despite having similar interface (Iterator would easily allow e.g. conversion to List[(String, Input)] which would be illegal).

    ObjectInput MUST always be fully exhausted. In order to ignore any remaining key-value mappings, skipRemaining() may be used.

  21. final class ObjectInputAsInput extends Input

    Permalink
  22. trait ObjectOutput extends SequentialOutput

    Permalink

    Represents an abstract sink for serialization of string-to-value mappings.

    Represents an abstract sink for serialization of string-to-value mappings. Any ObjectOutput instance must be assumed to be stateful and used in strictly sequential manner. After all key-value pairs have been written, finish() must be called to explicitly mark that the object is complete.

    ObjectOutput MUST preserve information about the order in which fields are written. ObjectInput is required to read fields in exactly the same order as ObjectOutput writes them.

  23. final class ObjectOutputAsOutput extends Output

    Permalink
  24. trait Output extends Any

    Permalink

    Represents an abstract sink to which a value may be serialized (written).

    Represents an abstract sink to which a value may be serialized (written). An Output instance should be assumed to be stateful. After calling any of the write methods, it MUST NOT be reused. This means that Output instance can be used only to write a single value. However, if the value to write is complex, one can use writeList/writeSet or writeObject/writeMap.

  25. final class PeekingObjectInput extends ObjectInput

    Permalink

    Wrapper over ObjectInput that lets you peek next field name without advancing the input.

  26. abstract class ProductCodec[T <: Product] extends ApplyUnapplyCodec[T]

    Permalink
  27. sealed trait RawRef extends AnyRef

    Permalink
  28. trait RecursiveAutoCodecs extends AnyRef

    Permalink
  29. abstract class SealedHierarchyCodec[T] extends ObjectCodec[T] with ErrorReportingCodec[T]

    Permalink
  30. trait SequentialInput extends Any

    Permalink
  31. trait SequentialOutput extends Any

    Permalink

    Base trait for outputs which allow writing of multiple values in sequence, i.e.

    Base trait for outputs which allow writing of multiple values in sequence, i.e. ListOutput and ObjectOutput.

  32. sealed trait SimpleRawRef extends RawRef

    Permalink
  33. class SimpleValueFieldInput extends SimpleValueInput with FieldInput

    Permalink
  34. class SimpleValueInput extends Input

    Permalink

    An Input for GenCodec complementary to SimpleValueOutput.

  35. class SimpleValueOutput extends Output

    Permalink

    An Output for GenCodec which serializes data into plain Scala objects.

    An Output for GenCodec which serializes data into plain Scala objects.

    - "lists" are represented as Scala Lists - "objects" are represented as String-keyed Scala Maps - simple values (strings, numbers, booleans, byte arrays) are represented as themselves, unchanged

    In other words, serialized value yield by SimpleValueOutput is a Scala object guaranteed to be one of: - null - Int - Long - Double - BigInt - BigDecimal - Boolean - String - Array[Byte] - scala.collection.Seq[Any] where every element is also one of the listed types - scala.collection.Map[String,Any] where every value is also one of the listed types

    Such format is often useful as an intermediate representation. For example, it can be later safely passed to standard Java serialization. However, for performance reasons it's recommended to implement dedicated Input and Output for the final format (e.g. binary or JSON).

  36. class SingletonCodec[T <: Singleton] extends OOOFieldsObjectCodec[T] with ErrorReportingCodec[T]

    Permalink
  37. class StreamFieldInput extends StreamInput with FieldInput

    Permalink
  38. class StreamInput extends Input

    Permalink
  39. class StreamOutput extends Output

    Permalink
  40. abstract class StringWrapperCompanion[T] extends TransparentWrapperCompanion[String, T]

    Permalink
  41. abstract class TransparentCodec[T, U] extends ErrorReportingCodec[T]

    Permalink
  42. abstract class TransparentWrapperCompanion[R, T] extends AnyRef

    Permalink
  43. trait TupleGenCodecs extends AnyRef

    Permalink

Ungrouped