2 * Copyright (c) 2015 Cisco Systems, Inc. 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.stmt.rfc6020;
10 import org.opendaylight.yangtools.yang.model.api.stmt.FractionDigitsStatement;
12 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
13 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
14 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
15 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
16 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
17 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
18 import org.opendaylight.yangtools.yang.model.api.stmt.RangeStatement;
19 import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
21 public class Decimal64SpecificationImpl extends AbstractDeclaredStatement<String> implements TypeStatement.Decimal64Specification{
23 protected Decimal64SpecificationImpl(StmtContext<String, TypeStatement.Decimal64Specification, ?> context) {
27 public static class Definition extends AbstractStatementSupport<String,TypeStatement.Decimal64Specification,EffectiveStatement<String,TypeStatement.Decimal64Specification>> {
30 super(Rfc6020Mapping.FRACTION_DIGITS);
33 @Override public String parseArgumentValue(StmtContext<?, ?, ?> ctx,
34 String value) throws SourceException {
38 @Override public TypeStatement.Decimal64Specification createDeclared(
39 StmtContext<String, TypeStatement.Decimal64Specification, ?> ctx) {
40 return new Decimal64SpecificationImpl(ctx);
43 @Override public EffectiveStatement<String, TypeStatement.Decimal64Specification> createEffective(
44 StmtContext<String, TypeStatement.Decimal64Specification, EffectiveStatement<String, TypeStatement.Decimal64Specification>> ctx) {
45 throw new UnsupportedOperationException();
50 public String getName() {
55 public FractionDigitsStatement getFractionDigits() {
56 return firstDeclared(FractionDigitsStatement.class);
60 public RangeStatement getRange() {
61 return firstDeclared(RangeStatement.class);