google / polymorphicDSL

Apache License 2.0
11 stars 7 forks source link

Let @PdslTest have a provider for the listener instead of relying on a default constructor #27

Closed incident-recipient closed 3 years ago

incident-recipient commented 3 years ago

Some usages of the annotation have created weird uses of inheritance to accommodate the need for a default constructor.

We should modify the listener field to follow a provider pattern or something more mature.

@PdslTest(
      includesResources = "Some.feature",
      parser = SomeParser.class,
      lexer = SomeLexer.class,
      listener = PortalProspectListener.class
)