Packages

object Molecule_In_2_Factory2 extends Molecule_In_2_Factory2

Source
Molecule_In_2_Factory.scala
Linear Supertypes
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. Molecule_In_2_Factory2
  2. Molecule_In_2_Factory2
  3. AnyRef
  4. 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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. macro def m[I1, I2, A, B](dsl: IN2_02[I1, I2, A, B]): InputMolecule_2_02[I1, I2, A, B]

    Macro creation of input molecule awaiting 2 inputs from user-defined DSL structure with 2 output attributes (arity 2).

    Macro creation of input molecule awaiting 2 inputs from user-defined DSL structure with 2 output attributes (arity 2).

    Molecules are build by adding one or more attributes to an initial namespace like Person from the example below.

    Applying the ? marker to attributes changes the semantics of a molecule to become an "input molecule" that awaits input at runtime for the attributes marked with ?.

    Once the input molecule has been resolved with input, we can call various actions on it, like get that retrieves matching data from the database.

    // Apply `?` to `age` and `score` attributes to create input molecule.
    // Input attributes can be tacit or mandatory
    val personAgeScore = m(Person.name.age_(?).score(?))
    
    // At runtime `age` and `score` values are applied to get the Person's name and score.
    // Since `score` was mandatory (without underscore), its value is also returned.
    personAgeScore(42, 7).get.head === ("Ben", 7)
    I1

    Type of input attribute 1 (age: Int)

    I2

    Type of input attribute 2 (score: Int)

    A

    Type of output attribute 1 (name: String)

    B

    Type of output attribute 2 (score: Int)

    dsl

    User-defined DSL structure modelling the input molecule

    returns

    Input molecule ready to be resolved

    Definition Classes
    Molecule_In_2_Factory2
  13. macro def m[I1, I2, A](dsl: IN2_01[I1, I2, A]): InputMolecule_2_01[I1, I2, A]

    Macro creation of input molecule awaiting 2 inputs from user-defined DSL structure with 1 output attribute (arity 1).

    Macro creation of input molecule awaiting 2 inputs from user-defined DSL structure with 1 output attribute (arity 1).

    Molecules are build by adding one or more attributes to an initial namespace like Person from the example below.

    Applying the ? marker to attributes changes the semantics of a molecule to become an "input molecule" that awaits input at runtime for the attributes marked with ?.

    Once the input molecule has been resolved with input, we can call various actions on it, like get that retrieves matching data from the database.

    // Apply `?` to `age` and `score` attributes to create input molecule.
    val personAgeScore = m(Person.name.age_(?).score_(?))
    
    // At runtime `age` and `score` values are applied to get the Person's name.
    personAgeScore(42, 7).get.head === "Ben"

    For arity-many molecules, data structures are returned as tuples. But for arity-1 molecules (like the example having only 1 output attribute, name) there's no need for a tuple, so values type-safely matching the attribute are returned directly in the list.

    I1

    Type of input attribute 1 (age: Int)

    I2

    Type of input attribute 2 (score: Int)

    A

    Type of output attribute 1 (name: String)

    dsl

    User-defined DSL structure modelling the input molecule

    returns

    Input molecule ready to be resolved

    Definition Classes
    Molecule_In_2_Factory2
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Molecule_In_2_Factory2

Inherited from AnyRef

Inherited from Any

input2

Ungrouped