Roger Alsing wrote:
Are there any plans to introduce something like contextual mixins?
that is, some way to decide which mixins to apply depending on context
(not in a layer/module sense but rather in a compositional context).
What is the context in this case? It sounds like it could be an internal
flag selecting one strategy or the other.
If so, then one option is to indeed have a Property<Enum> with the
strategy selection (line/polygon), and then in the main mixin which is
callable from outside do both "@This LineShapeSelectionRenderer line"
and "@This PolygonShapeSelectionRenderer polygon" (which then become
internal mixins), and switch depending on the flag.
Or, you can make these implementations external and use the Strategy
pattern as-is.
Would either of these work for you?
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev