org.dianahep.histogrammar

Factory

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
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. def apply(name: String): Factory

    Get a registered container by its name.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean

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

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

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. 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).

  13. 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).

  14. 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).

  15. 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).

  16. 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).

  17. final def getClass(): Class[_]

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

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

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

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

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

    Definition Classes
    AnyRef
  23. 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.

  24. def registered: ListMap[String, Factory]

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

  25. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped