Centralize substatement validators 99/95899/2
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Apr 2021 07:29:09 +0000 (09:29 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 23 Apr 2021 07:47:21 +0000 (09:47 +0200)
Most statement supports have a constant validator and we end up
duplicating things. Furthermore we are ending up with megamorphic
dispatch which could easily be squashed into a simple field read.

AbstractStatementSupport now requires an explicit SubstatementValidator,
which it stores in a field, thus reducing the number of
StatementSupport.substatementValidator() instances.

Change-Id: I4d7f6247403ee64b65ddcd81ac91a5e8eef20539
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>

No differences found