Packages

object Factory

Entry point for constructing containers from JSON and centralized registry of container types.

Containers filled in Python or on remote sites are serialized as JSON that the Factory object can reconstruct. Reconstructed containers are fixed (immutable, cannot aggregate), but can be merged with the + operator. (Click on the "o" in a circle in the upper-left to see the Factory trait's documentation, which explains the difference.)

To do this, the Factory object must dispatch JSON to the appropriate container for interpretation. It therefore manages a global registry of container types (concrete instances of the Factory trait). General users are not expected to add to this registry, but they could if they want to.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Factory
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

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. def apply(name: String): Factory

    Get a registered container by its name.

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  9. def fromJson(json: Json): Container[_] with NoAggregation

    User's entry point for reconstructing a container from a JSON object.

    User's entry point for reconstructing a container from a JSON object.

    The container's type is not known at compile-time, so it must be cast (with the container's as method) or pattern-matched (with the corresponding Factory).

  10. def fromJsonFile(file: File): Container[_] with NoAggregation

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    The container's type is not known at compile-time, so it must be cast (with the container's as method) or pattern-matched (with the corresponding Factory).

  11. def fromJsonFile(fileName: String): Container[_] with NoAggregation

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    The container's type is not known at compile-time, so it must be cast (with the container's as method) or pattern-matched (with the corresponding Factory).

  12. def fromJsonStream(inputStream: InputStream): Container[_] with NoAggregation

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    User's entry point for reading a container as JSON from a UTF-8 encoded file.

    Note: fully consumes the inputStream.

    The container's type is not known at compile-time, so it must be cast (with the container's as method) or pattern-matched (with the corresponding Factory).

  13. def fromJsonString(str: String): Container[_] with NoAggregation

    User's entry point for reconstructing a container from JSON text.

    User's entry point for reconstructing a container from JSON text.

    The container's type is not known at compile-time, so it must be cast (with the container's as method) or pattern-matched (with the corresponding Factory).

  14. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. def register(factory: Factory): Unit

    Add a new Factory to the registry, introducing a new container type on the fly.

    Add a new Factory to the registry, introducing a new container type on the fly. General users usually wouldn't do this, but they could. This method is used internally to define the standard container types.

  21. def registered: ListMap[String, Factory]

    Get a list of registered containers as a Map from factory name to Factory object.

  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(): String
    Definition Classes
    AnyRef → Any
  24. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  25. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  26. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped