- Companion:
- object
Type members
Classlikes
Value generation strategy for a particular output parameter/setter
Value generation strategy for a particular output parameter/setter
- Companion:
- object
Final platform-independent result of matching inputs with outputs using resolved strategies
Final platform-independent result of matching inputs with outputs using resolved strategies
- Companion:
- object
Stores information how each attribute/getter could be extracted from In
value
Stores information how each attribute/getter could be extracted from In
value
- Companion:
- object
Stores information how Out
value could be constructed from values of constructor parameters/passed to setters
Stores information how Out
value could be constructed from values of constructor parameters/passed to setters
- Companion:
- object
Value members
Abstract methods
Platform-specific way of parsing In
data
Platform-specific way of parsing In
data
Should:
- obtain all methods which are Scala's getters (vals, nullary defs)
- obtain all methods which are Java Bean getters (starting with is- or get-)
- for each create an
InField
factory which takesIn
argument and returnsInField
expression - form obtained collection into
ProductInData
Platform-specific way of parsing Out
data
Platform-specific way of parsing Out
data
Should:
- verify whether output is a case class, a case object or a Java Bean
- obtain respectively:
- a constructor taking all arguments
- expression containing case object value
- a default constructor and collection of setters respectively
- form obtained data into
ProductOutData
Platform-specific way of generating code from resolved information
Platform-specific way of generating code from resolved information
For case class output should generate code like:
pipeDerivation.lift { (in: In, ctx: pipeDerivation.Context) =>
pipeDerivation.mergeResult(
ctx,
pipeDerivation.mergeResult(
ctx,
pipeDerivation.pure(Array[Any](2)),
pipeDerivation.unlift(fooPipe, in.foo, pipeDerivation.updateContext(ctx, Path.root.field("foo"))),
{ (left, right) =>
left(0) = right
left
}
),
pipeDerivation.unlift(barPipe, in.bar, pipeDerivation.updateContext(ctx, Path.root.field("bar"))),
{ (left, right) =>
left(1) = right
new Out(
foo = left(0).asInstanceOf[Foo2],
bar = left(1).asInstanceOf[Bar2],
)
}
)
}
For case object output should generate code like:
pipeDerivation.lift { (in: In, ctx: pipeDerivation.Context) =>
pipeDerivation.pure(CaseObject)
}
For Java Bean should generate code like:
pipeDerivation.lift { (in: In, ctx: pipeDerivation.Context) =>
pipeDerivation.mergeResult(
ctx,
pipeDerivation.mergeResult(
ctx,
pipeDerivation.pure {
val result = new Out()
result
},
pipeDerivation.unlift(fooPipe, in.foo, pipeDerivation.updateContext(ctx, Path.root.field("foo"))),
{ (left, right) =>
left.setFoo(right)
left
}
),
pipeDerivation.unlift(barPipe, in.bar, pipeDerivation.updateContext(ctx, Path.root.field("bar"))),
{ (left, right) =>
left.setBar(right)
left
}
)
}
True iff A
is defined as case class
, is NOT abstract and has a public constructor
True iff A
is defined as case class
, is NOT abstract and has a public constructor
True iff A
is defined as case object
, and is public
True iff A
is defined as case object
, and is public