import java.util.Collection;
import org.opendaylight.yangtools.yang.common.QName;
import org.opendaylight.yangtools.yang.model.api.IdentitySchemaNode;
-import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
import org.opendaylight.yangtools.yang.model.api.meta.DeclaredStatement;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.BaseEffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.BaseStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.IdentityEffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.IdentityRefSpecification;
+import org.opendaylight.yangtools.yang.model.parser.api.YangParserConfiguration;
import org.opendaylight.yangtools.yang.model.ri.type.BaseTypes;
import org.opendaylight.yangtools.yang.model.ri.type.IdentityrefTypeBuilder;
import org.opendaylight.yangtools.yang.parser.spi.IdentityNamespace;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStringStatementSupport;
import org.opendaylight.yangtools.yang.parser.spi.meta.CommonStmtCtx;
import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx.Current;
import org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException;
import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
abstract class AbstractIdentityRefSpecificationSupport
- extends AbstractStringStatementSupport<IdentityRefSpecification,
- EffectiveStatement<String, IdentityRefSpecification>> {
- AbstractIdentityRefSpecificationSupport() {
- super(YangStmtMapping.TYPE, StatementPolicy.exactReplica());
+ extends AbstractTypeSupport<IdentityRefSpecification> {
+ AbstractIdentityRefSpecificationSupport(final YangParserConfiguration config) {
+ super(config);
}
@Override
- public final void onFullDefinitionDeclared(final Mutable<String, IdentityRefSpecification,
- EffectiveStatement<String, IdentityRefSpecification>> stmt) {
+ public final void onFullDefinitionDeclared(final Mutable<QName, IdentityRefSpecification,
+ EffectiveStatement<QName, IdentityRefSpecification>> stmt) {
super.onFullDefinitionDeclared(stmt);
final Collection<StmtContext<QName, BaseStatement, ?>> baseStatements =
}
@Override
- protected final IdentityRefSpecification createDeclared(final StmtContext<String, IdentityRefSpecification, ?> ctx,
+ protected final IdentityRefSpecification createDeclared(final StmtContext<QName, IdentityRefSpecification, ?> ctx,
final ImmutableList<? extends DeclaredStatement<?>> substatements) {
if (substatements.isEmpty()) {
throw noBase(ctx);
}
- return new IdentityRefSpecificationImpl(ctx.getRawArgument(), substatements);
+ return new IdentityRefSpecificationImpl(ctx.getRawArgument(), ctx.getArgument(), substatements);
}
@Override
- protected final EffectiveStatement<String, IdentityRefSpecification> createEffective(
- final Current<String, IdentityRefSpecification> stmt,
+ protected final EffectiveStatement<QName, IdentityRefSpecification> createEffective(
+ final Current<QName, IdentityRefSpecification> stmt,
final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
if (substatements.isEmpty()) {
throw noBase(stmt);