+ /**
+ * Constructor.
+ *
+ * @param ctx
+ * context of statement.
+ * @param buildUnknownSubstatements
+ * if it is false, the unknown substatements are omitted from
+ * build of effective substatements till the call of either
+ * effectiveSubstatements or getOmittedUnknownSubstatements
+ * method. The main purpose of this is to allow the build of
+ * recursive extension definitions.
+ */
+ protected EffectiveStatementBase(final StmtContext<A, D, ?> ctx, final boolean buildUnknownSubstatements) {
+
+ final Collection<StatementContextBase<?, ?, ?>> effectiveSubstatements = ctx.effectiveSubstatements();
+ final Collection<StatementContextBase<?, ?, ?>> substatementsInit = new ArrayList<>();
+
+ final Collection<StatementContextBase<?, ?, ?>> supportedDeclaredSubStmts = Collections2.filter(
+ ctx.declaredSubstatements(), StmtContextUtils::areFeaturesSupported);
+ for (final StatementContextBase<?, ?, ?> declaredSubstatement : supportedDeclaredSubStmts) {