I'm writing a DSL in MPS to define event producer/consumers, like this:
on FooEventProducer
then FooEventConsumer
where:
class FooEventProducer implements Producer<FooEvent> {}
class FooEventConsumer implements Consumer<FooEvent> {}
I have an On concept containing a ClassifierType reference.
How do I constrain the ClassifierType reference to subclasses of Producer?
I recommend that you create and use your own sub-concept of ClassifierType, which specifies constraints on the "classifier" reference, something like: