import org.opendaylight.yangtools.yang.parser.spi.meta.NamespaceBehaviour.Registry;
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.StmtContextUtils;
import org.opendaylight.yangtools.yang.parser.spi.source.IncludedModuleContext;
import org.opendaylight.yangtools.yang.parser.spi.source.StatementSourceReference;
final StatementSourceReference ref, final String rawArgument) {
super(def, ref, rawArgument);
this.sourceContext = Preconditions.checkNotNull(sourceContext);
- this.argument = def.parseArgumentValue(this, rawArgument);
+ this.argument = def.parseArgumentValue(this, rawStatementArgument());
}
RootStatementContext(final SourceSpecificContext sourceContext, final StatementDefinitionContext<A, D, E> def,
sourceContext = Preconditions.checkNotNull(original.sourceContext);
this.argument = original.argument;
- final Collection<StatementContextBase<?, ?, ?>> declared = original.declaredSubstatements();
- final Collection<StatementContextBase<?, ?, ?>> effective = original.effectiveSubstatements();
- final Collection<StatementContextBase<?, ?, ?>> buffer = new ArrayList<>(declared.size() + effective.size());
+ final Collection<? extends Mutable<?, ?, ?>> declared = original.mutableDeclaredSubstatements();
+ final Collection<? extends Mutable<?, ?, ?>> effective = original.mutableEffectiveSubstatements();
+ final Collection<Mutable<?, ?, ?>> buffer = new ArrayList<>(declared.size() + effective.size());
- for (final StatementContextBase<?, ?, ?> stmtContext : declared) {
- if (StmtContextUtils.areFeaturesSupported(stmtContext)) {
+ for (final Mutable<?, ?, ?> stmtContext : declared) {
+ if (stmtContext.isSupportedByFeatures()) {
buffer.add(stmtContext.createCopy(newQNameModule, this, typeOfCopy));
}
}
* @throws org.opendaylight.yangtools.yang.parser.spi.source.SourceException instance of SourceException
*/
@Override
- public StatementContextBase<?, ?, ?> createCopy(final StatementContextBase<?, ?, ?> newParent,
+ public StatementContextBase<A, D, E> createCopy(final StatementContextBase<?, ?, ?> newParent,
final CopyType typeOfCopy) {
return createCopy(null, newParent, typeOfCopy);
}
return true;
}
+ @Override
+ public boolean isInYangDataExtensionBody() {
+ return false;
+ }
+
@Override
public boolean isEnabledSemanticVersioning() {
return sourceContext.isEnabledSemanticVersioning();
}
@Override
- public <K, V, N extends IdentifierNamespace<K, V>> void addToLocalStorage(final Class<N> type, final K key,
+ public <K, V, N extends IdentifierNamespace<K, V>> V putToLocalStorage(final Class<N> type, final K key,
final V value) {
if (IncludedModuleContext.class.isAssignableFrom(type)) {
if (includedContexts.isEmpty()) {
Verify.verify(value instanceof RootStatementContext);
includedContexts.add((RootStatementContext<?, ?, ?>) value);
}
- super.addToLocalStorage(type, key, value);
+ return super.putToLocalStorage(type, key, value);
}
@Nullable