import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.OnDemandSchemaTreeStorageNode;
import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.StorageNodeType;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextDefaults;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference;
import org.slf4j.Logger;
public <X, Z extends EffectiveStatement<X, ?>> @NonNull Optional<X> findSubstatementArgument(
final @NonNull Class<Z> type) {
if (substatements instanceof List) {
- return StmtContextDefaults.findSubstatementArgument(this, type);
+ return super.findSubstatementArgument(type);
}
final Optional<X> templateArg = prototype.findSubstatementArgument(type);
@Override
public boolean hasSubstatement(final @NonNull Class<? extends EffectiveStatement<?, ?>> type) {
- return substatements instanceof List ? StmtContextDefaults.hasSubstatement(prototype, type)
+ return substatements instanceof List ? super.hasSubstatement(type)
// We do not allow deletion of partially-materialized statements, hence this is accurate
: prototype.hasSubstatement(type);
}
}
private Optional<? extends Mutable<?, ?, ?>> copySubstatement(final Mutable<?, ?, ?> substatement) {
+ // FIXME: YANGTOOLS-1195: this is not exactly what we want to do here, because we are deling with two different
+ // requests: copy for inference purposes (this method), while we also copy for purposes
+ // of buildEffective() -- in which case we want to probably invoke asEffectiveChildOf()
+ // or similar
return substatement.copyAsChildOf(this, childCopyType, targetModule);
}
}
@Override
- public boolean effectiveConfig() {
- return isConfiguration(parent);
+ public EffectiveConfig effectiveConfig() {
+ return effectiveConfig(parent);
}
@Override