Any implementing class should provide the fact from which to project the fields through this method.
Any implementing class should provide the fact from which to project the fields through this method.
the ListFact of type C from which fields will be projected.
Provides a utility method to construct the DslEvaluation which entails the field projection.
Provides a utility method to construct the DslEvaluation which entails the field projection.
type of the projected field, which will also be the type of the resulting DslEvaluation.
the function which projects the Fact's value to the corresponding field of type F.
a DslEvaluation of the same type as the projected field. This evaluation will at runtime provide the value of the projected field of the accompanying Fact.
Domain objects in the DSL can allow access to their fields through projections. This trait signals the support of field projections and provides a convenience method to create these projections. This trait is meant for Lists of objects to project a List of traits back.
Here's an example:
With these elements in place, you can import the PersonImplicits._ where you want to use it in your DSL and you can refer to the
name
field of anyFact
of typePerson
.type from which the field(s) can be projected.