+ static final void afterAddEffectiveSubstatement(final Mutable<?, ?, ?> substatement) {
+ // Undeclared statements still need to have 'onDeclarationFinished()' triggered
+ if (substatement instanceof UndeclaredStmtCtx) {
+ finishDeclaration((UndeclaredStmtCtx<?, ?, ?>) substatement);
+ }
+ }
+
+ // Split out to keep generics working without a warning
+ private static <X, Y extends DeclaredStatement<X>, Z extends EffectiveStatement<X, Y>> void finishDeclaration(
+ final UndeclaredStmtCtx<X, Y, Z> substatement) {
+ substatement.definition().onDeclarationFinished(substatement, ModelProcessingPhase.FULL_DECLARATION);
+ }
+