import static com.google.common.base.Verify.verifyNotNull;
+import com.google.common.annotations.Beta;
import com.google.common.base.VerifyException;
import com.google.common.collect.Iterables;
import com.google.common.collect.Streams;
*
* @return Original definition, if this statement was copied.
*/
- // FIXME: 5.0.0: this should return Optional<? extends StmtContext<A, D, E>>, is that feasible?
- Optional<StmtContext<?, ?, ?>> getOriginalCtx();
+ Optional<StmtContext<A, D, E>> getOriginalCtx();
/**
* Return the context of the previous copy of this statement -- effectively walking towards the source origin
*
* @return Context of the previous copy of this statement, if this statement has been copied.
*/
- // FIXME: 5.0.0: this should return Optional<? extends StmtContext<A, D, E>>
- Optional<? extends StmtContext<?, ?, ?>> getPreviousCopyCtx();
+ Optional<StmtContext<A, D, E>> getPreviousCopyCtx();
ModelProcessingPhase getCompletedPhase();
return childCopyOf(stmt, type, null);
}
+ @Beta
+ @NonNull Optional<? extends Mutable<?, ?, ?>> copyAsChildOf(Mutable<?, ?, ?> parent, CopyType type,
+ @Nullable QNameModule targetModule);
+
@Override
default Collection<? extends StmtContext<?, ?, ?>> declaredSubstatements() {
return mutableDeclaredSubstatements();