com.fsist.safepickle

Autogen

object Autogen

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Autogen
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. abstract type |[A, B]

    A way to list two or more types, e.g.

    A way to list two or more types, e.g. String | Int | Foo.

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. macro def apply[T]: Pickler[T]

    Autogenerate a Pickler.

    Autogenerate a Pickler. See the documentation in the project's README.md.

  5. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  6. macro def children[T, Children]: Pickler[T]

    Works like Autogen.apply[T].

    Works like Autogen.apply[T]. T must be a sealed trait or sealed abstract class.

    The type argument Children explicitly specifies the concrete sub-types of T that should be supported. It is necessary to call this instead of Autogen.apply[T] when the macro call is made in the same compilation unit where T is defined, due to SI-7588.

    Children

    should be either a concrete subtype of T, or several types chained with the | type, e.g. A | B | C.

  7. macro def childrenDebug[T, Children]: Pickler[T]

    As children, but prints the generated code as a compiler informational message.

    As children, but prints the generated code as a compiler informational message. Useful for debugging if the macro-generated code does not compile.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. macro def debug[T]: Pickler[T]

    As apply, but prints the generated code as a compiler informational message.

    As apply, but prints the generated code as a compiler informational message. Useful for debugging if the macro-generated code does not compile.

  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  14. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  17. final def notify(): Unit

    Definition Classes
    AnyRef
  18. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  20. def toString(): String

    Definition Classes
    AnyRef → Any
  21. macro def versioned[T, TOld <: OldVersion[_]]: Pickler[T]

    Generates a version compatibility bridge from the old version TOld to the current version T of the same type.

    Generates a version compatibility bridge from the old version TOld to the current version T of the same type.

    Suppose you want to make a backward-incompatible change to the type Foo. You should keep an unmodified copy of the declaration of Foo; it doesn't have to include methods, just the fields necessary for pickling. Call this unmodified copy OldFoo.

    Both OldFoo and Foo should have picklers defined, whether using Autogen or manually. The pickler for OldFoo must be the same as that which existed for Foo before it was modified.

    Make OldFoo extend OldVersion[Foo], and implement the OldVersion.toNewVersion method, which will convert an OldFoo to the updated Foo.

    Now change Foo's pickler definition to be Autogen.versioned[Foo, Foo, OldFoo].

    The end result will be that the Pickler[Foo] generated by Autogen.versioned will be able to read pickled OldFoo values as well as pickled Foo values. Application code will always transparently receive Foo values. The pickler will only write Foo values, not OldFoo ones.

    If you have more than old version of the same type, they should implemented the OldVersion trait in sequence, like so:

    case class FooV1 extends OldVersion[FooV2] case class FooV2 extends OldVersion[FooV3] case class FooV3 extends OldVersion[Foo]

    Autogen.versioned[Foo, FooV1]

    The TOld type parameter passed to Autogen.versioned should be the oldest version available. The macro will follow the chain of OldVersion implementations until it reaches Foo.

  22. macro def versionedDebug[T, TOld <: OldVersion[_]]: Pickler[T]

    As versioned, but prints the generated code as a compiler informational message.

    As versioned, but prints the generated code as a compiler informational message. Useful for debugging if the macro-generated code does not compile.

  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped