public abstract RootStatementContext<?, ?, ?> getRoot();
@Override
- public abstract Collection<? extends StatementContextBase<?, ?, ?>> mutableDeclaredSubstatements();
+ public abstract Collection<? extends @NonNull StatementContextBase<?, ?, ?>> mutableDeclaredSubstatements();
@Override
- public final @NonNull Registry getBehaviourRegistry() {
+ public final Registry getBehaviourRegistry() {
return getRoot().getBehaviourRegistryImpl();
}
return QName.create(StmtContextUtils.getRootModuleQName(root), root.getRawArgument());
}
- @Override
- @Deprecated(since = "7.0.9", forRemoval = true)
- public final EffectiveStatement<?, ?> original() {
- return getOriginalCtx().map(StmtContext::buildEffective).orElse(null);
- }
-
//
// 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.
}
protected ToStringHelper addToStringAttributes(final ToStringHelper toStringHelper) {
- return toStringHelper.add("definition", definition()).add("rawArgument", rawArgument())
- .add("refCount", refString());
+ return toStringHelper.add("definition", definition()).add("argument", argument()).add("refCount", refString());
}
private String refString() {
QNameModule targetModule);
@Override
- public final ReactorStmtCtx<A, D, E> replicaAsChildOf(final Mutable<?, ?, ?> parent) {
+ public final ReplicaStatementContext<A, D, E> replicaAsChildOf(final Mutable<?, ?, ?> parent) {
checkArgument(parent instanceof StatementContextBase, "Unsupported parent %s", parent);
- return replicaAsChildOf((StatementContextBase<?, ?, ?>) parent);
+ final var ret = replicaAsChildOf((StatementContextBase<?, ?, ?>) parent);
+ definition().onStatementAdded(ret);
+ return ret;
}
abstract @NonNull ReplicaStatementContext<A, D, E> replicaAsChildOf(@NonNull StatementContextBase<?, ?, ?> parent);
}
private @NonNull E loadEffective() {
- // Creating an effective statement does not strictly require a declared instance -- there are statements like
- // 'input', which are implicitly defined.
- // Our implementation design makes an invariant assumption that buildDeclared() has been called by the time
- // we attempt to create effective statement:
- declared();
-
final E ret = createEffective();
effectiveInstance = ret;
// we have called createEffective(), substatements are no longer guarded by us. Let's see if we can clear up