+ //
+ // In the next two methods we are looking for an effective statement. If we already have an effective instance,
+ // defer to it's implementation of the equivalent search. Otherwise we search our substatement contexts.
+ //
+ // Note that the search function is split, so as to allow InferredStatementContext to do its own thing first.
+ //
+
+ @Override
+ public final <X, Z extends EffectiveStatement<X, ?>> @NonNull Optional<X> findSubstatementArgument(
+ final @NonNull Class<Z> type) {
+ final E existing = effectiveInstance;
+ return existing != null ? existing.findFirstEffectiveSubstatementArgument(type)
+ : findSubstatementArgumentImpl(type);
+ }
+