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 javax.annotation.Nonnull;
11 import javax.annotation.Nullable;
13 import org.opendaylight.yangtools.yang.model.api.Rfc6020Mapping;
14 import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
15 import org.opendaylight.yangtools.yang.model.api.stmt.LengthStatement;
16 import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
17 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
18 import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
19 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
20 import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
21 import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.BinaryEffectiveStatementImpl;
23 public class BinarySpecificationImpl extends AbstractDeclaredStatement<String> implements
24 TypeStatement.BinarySpecification {
26 protected BinarySpecificationImpl(StmtContext<String, ?, ?> context) {
30 public static class Definition extends
31 AbstractStatementSupport<String, BinarySpecification, EffectiveStatement<String, BinarySpecification>> {
34 super(Rfc6020Mapping.TYPE);
38 public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) throws SourceException {
43 public BinarySpecification createDeclared(StmtContext<String, BinarySpecification, ?> ctx) {
44 return new BinarySpecificationImpl(ctx);
48 public EffectiveStatement<String, BinarySpecification> createEffective(
49 StmtContext<String, BinarySpecification, EffectiveStatement<String, BinarySpecification>> ctx) {
50 return new BinaryEffectiveStatementImpl(ctx);
56 public LengthStatement getLength() {
57 return firstDeclared(LengthStatement.class);
62 public String getName() {