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();
}
}
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
}
@Override
- public final void setIsSupportedToBuildEffective(final boolean isSupportedToBuildEffective) {
- this.isSupportedToBuildEffective = isSupportedToBuildEffective;
+ public final void setUnsupported() {
+ this.isSupportedToBuildEffective = false;
}
@Override