protected abstract @NonNull D createEmptyDeclared(@NonNull StmtContext<A, D, ?> ctx);
@Override
- public final E createEffective(final StmtContext<A, D, E> ctx) {
+ public E createEffective(final StmtContext<A, D, E> ctx) {
final D declared = ctx.buildDeclared();
final ImmutableList<? extends EffectiveStatement<?, ?>> substatements =
buildEffectiveSubstatements(ctx, statementsToBuild(ctx, declaredSubstatements(ctx)));
}
protected static final <A, E extends EffectiveStatement<A, ?>> A findFirstArgument(
- final ImmutableList<? extends EffectiveStatement<?, ?>> statements, final Class<E> type, final A defValue) {
+ final ImmutableList<? extends EffectiveStatement<?, ?>> statements, final Class<@NonNull E> type,
+ final A defValue) {
final @Nullable E stmt = findFirstStatement(statements, type);
return stmt != null ? stmt.argument() : defValue;
}
return defaultBuildEffectiveSubstatements(substatements);
}
- static final ImmutableList<? extends EffectiveStatement<?, ?>> buildEffectiveSubstatements(
- final StmtContext<?, ?, ?> ctx) {
- return defaultBuildEffectiveSubstatements(declaredSubstatements(ctx));
- }
-
private static ImmutableList<? extends EffectiveStatement<?, ?>> defaultBuildEffectiveSubstatements(
final List<? extends StmtContext<?, ?, ?>> substatements) {
return substatements.stream()
.collect(ImmutableList.toImmutableList());
}
- static final @NonNull List<StmtContext<?, ?, ?>> declaredSubstatements(final StmtContext<?, ?, ?> ctx) {
+ private static @NonNull List<StmtContext<?, ?, ?>> declaredSubstatements(final StmtContext<?, ?, ?> ctx) {
/*
* This dance is required to ensure that effects of 'uses' nodes are applied in the same order as
* the statements were defined -- i.e. if we have something like this:
* The reactor would first inline 'uses baz' as that definition is the first one completely resolved and then
* inline 'uses bar'. Here we are iterating in declaration order re-inline the statements.
*
- * FIXME: 6.0.0: this really should be handled by UsesStatementSupport such that 'uses baz' would have a
+ * FIXME: 7.0.0: this really should be handled by UsesStatementSupport such that 'uses baz' would have a
* prerequisite of a resolved 'uses bar'.
*/
final List<StmtContext<?, ?, ?>> substatementsInit = new ArrayList<>();