2 * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
10 import org.opendaylight.yangtools.yang.model.api.stmt.BitEffectiveStatement;
11 import org.opendaylight.yangtools.yang.model.api.stmt.EnumEffectiveStatement;
12 import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition;
13 import org.opendaylight.yangtools.yang.model.api.type.BitsTypeDefinition.Bit;
14 import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition;
15 import org.opendaylight.yangtools.yang.model.api.type.EnumTypeDefinition.EnumPair;
16 import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.EffectiveStmtCtx;
18 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
20 public final class TypeStatementRFC6020Support extends AbstractTypeStatementSupport {
21 public TypeStatementRFC6020Support(final YangParserConfiguration config) {
26 Bit addRestrictedBit(final EffectiveStmtCtx stmt, final BitsTypeDefinition base, final BitEffectiveStatement bit) {
27 throw new SourceException("Restricted bits type is not allowed in YANG version 1", stmt);
32 EnumPair addRestrictedEnum(final EffectiveStmtCtx stmt, final EnumTypeDefinition base,
33 final EnumEffectiveStatement enumStmt) {
34 throw new SourceException("Restricted enumeration type is not allowed in YANG version 1", stmt);