* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-public class NumericalRestrictionsEffectiveStatementImpl
+// FIXME: this class is not used anywhere, decide its future
+final class NumericalRestrictionsEffectiveStatement
extends DeclaredEffectiveStatementBase<String, NumericalRestrictions> {
- public NumericalRestrictionsEffectiveStatementImpl(final StmtContext<String, NumericalRestrictions, ?> ctx) {
+ NumericalRestrictionsEffectiveStatement(final StmtContext<String, NumericalRestrictions, ?> ctx) {
super(ctx);
}
}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
+
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.model.api.stmt.RangeStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
+import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
+
+// FIXME: this class is not used anywhere, decide its future
+final class NumericalRestrictionsImpl extends AbstractDeclaredStatement<String> implements NumericalRestrictions {
+ NumericalRestrictionsImpl(final StmtContext<String, NumericalRestrictions, ?> context) {
+ super(context);
+ }
+
+ @Nonnull
+ @Override
+ public String getName() {
+ return argument();
+ }
+
+ @Nonnull
+ @Override
+ public RangeStatement getRange() {
+ return firstDeclared(RangeStatement.class);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
+
+import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
+import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
+import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
+
+// FIXME: this class is not used anywhere, decide its future
+final class NumericalRestrictionsSupport extends
+ AbstractStatementSupport<String, NumericalRestrictions, EffectiveStatement<String, NumericalRestrictions>> {
+ private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
+ .TYPE)
+ .addMandatory(YangStmtMapping.RANGE)
+ .build();
+
+ NumericalRestrictionsSupport() {
+ super(YangStmtMapping.TYPE);
+ }
+
+ @Override
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
+ return value;
+ }
+
+ @Override
+ public NumericalRestrictions createDeclared(final StmtContext<String, NumericalRestrictions, ?> ctx) {
+ return new NumericalRestrictionsImpl(ctx);
+ }
+
+ @Override
+ public EffectiveStatement<String, NumericalRestrictions> createEffective(
+ final StmtContext<String, NumericalRestrictions,
+ EffectiveStatement<String, NumericalRestrictions>> ctx) {
+ return new NumericalRestrictionsEffectiveStatement(ctx);
+ }
+
+ @Override
+ protected SubstatementValidator getSubstatementValidator() {
+ return SUBSTATEMENT_VALIDATOR;
+ }
+}
\ No newline at end of file
* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-package org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type;
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.StringRestrictions;
import org.opendaylight.yangtools.yang.parser.rfc7950.stmt.DeclaredEffectiveStatementBase;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-public class StringRestrictionsEffectiveStatementImpl
+// FIXME: this class is not used anywhere, decide its future
+final class StringRestrictionsEffectiveStatement
extends DeclaredEffectiveStatementBase<String, StringRestrictions> {
- public StringRestrictionsEffectiveStatementImpl(final StmtContext<String, StringRestrictions, ?> ctx) {
+ StringRestrictionsEffectiveStatement(final StmtContext<String, StringRestrictions, ?> ctx) {
super(ctx);
}
}
--- /dev/null
+/*
+ * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
+
+import java.util.Collection;
+import javax.annotation.Nonnull;
+import org.opendaylight.yangtools.yang.model.api.stmt.LengthStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.PatternStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
+
+// FIXME: this class is not used anywhere, decide its future
+final class StringRestrictionsImpl extends AbstractDeclaredStatement<String> implements
+ TypeStatement.StringRestrictions {
+ StringRestrictionsImpl(final StmtContext<String, StringRestrictions, ?> context) {
+ super(context);
+ }
+
+ @Nonnull
+ @Override
+ public String getName() {
+ return argument();
+ }
+
+ @Override
+ public LengthStatement getLength() {
+ return firstDeclared(LengthStatement.class);
+ }
+
+ @Nonnull
+ @Override
+ public Collection<? extends PatternStatement> getPatterns() {
+ return allDeclared(PatternStatement.class);
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2017 Pantheon Technologies, s.r.o. and others. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.yangtools.yang.parser.rfc7950.stmt.type;
+
+import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
+import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.StringRestrictions;
+import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
+import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
+import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
+
+//FIXME: this class is not used anywhere, decide its future
+final class StringRestrictionsSupport
+ extends AbstractStatementSupport<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> {
+ private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
+ .TYPE)
+ .addOptional(YangStmtMapping.LENGTH)
+ .addAny(YangStmtMapping.PATTERN)
+ .build();
+
+ StringRestrictionsSupport() {
+ super(YangStmtMapping.TYPE);
+ }
+
+ @Override
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
+ return value;
+ }
+
+ @Override
+ public StringRestrictions createDeclared(final StmtContext<String, StringRestrictions, ?> ctx) {
+ return new StringRestrictionsImpl(ctx);
+ }
+
+ @Override
+ public EffectiveStatement<String, StringRestrictions> createEffective(
+ final StmtContext<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> ctx) {
+ return new StringRestrictionsEffectiveStatement(ctx);
+ }
+
+ @Override
+ protected SubstatementValidator getSubstatementValidator() {
+ return SUBSTATEMENT_VALIDATOR;
+ }
+}
\ No newline at end of file
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.stmt.rfc6020;
-
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
-import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.RangeStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.NumericalRestrictionsEffectiveStatementImpl;
-
-public class NumericalRestrictionsImpl extends AbstractDeclaredStatement<String> implements NumericalRestrictions {
- private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
- .TYPE)
- .addMandatory(YangStmtMapping.RANGE)
- .build();
-
- protected NumericalRestrictionsImpl(final StmtContext<String, NumericalRestrictions, ?> context) {
- super(context);
- }
-
- public static class Definition extends
- AbstractStatementSupport<String, NumericalRestrictions, EffectiveStatement<String, NumericalRestrictions>> {
-
- public Definition() {
- super(YangStmtMapping.TYPE);
- }
-
- @Override
- public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
- return value;
- }
-
- @Override
- public NumericalRestrictions createDeclared(final StmtContext<String, NumericalRestrictions, ?> ctx) {
- return new NumericalRestrictionsImpl(ctx);
- }
-
- @Override
- public EffectiveStatement<String, NumericalRestrictions> createEffective(
- final StmtContext<String, NumericalRestrictions,
- EffectiveStatement<String, NumericalRestrictions>> ctx) {
- return new NumericalRestrictionsEffectiveStatementImpl(ctx);
- }
-
- @Override
- protected SubstatementValidator getSubstatementValidator() {
- return SUBSTATEMENT_VALIDATOR;
- }
- }
-
- @Nonnull
- @Override
- public String getName() {
- return argument();
- }
-
- @Nonnull
- @Override
- public RangeStatement getRange() {
- return firstDeclared(RangeStatement.class);
- }
-}
+++ /dev/null
-/*
- * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.yangtools.yang.parser.stmt.rfc6020;
-
-import java.util.Collection;
-import javax.annotation.Nonnull;
-import org.opendaylight.yangtools.yang.model.api.YangStmtMapping;
-import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.LengthStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.PatternStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
-import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
-import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.StringRestrictionsEffectiveStatementImpl;
-
-public class StringRestrictionsImpl extends AbstractDeclaredStatement<String> implements
- TypeStatement.StringRestrictions {
- private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
- .TYPE)
- .addOptional(YangStmtMapping.LENGTH)
- .addAny(YangStmtMapping.PATTERN)
- .build();
-
- protected StringRestrictionsImpl(final StmtContext<String, StringRestrictions, ?> context) {
- super(context);
- }
-
- public static class Definition
- extends
- AbstractStatementSupport<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> {
-
- public Definition() {
- super(YangStmtMapping.TYPE);
- }
-
- @Override
- public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
- return value;
- }
-
- @Override
- public StringRestrictions createDeclared(final StmtContext<String, StringRestrictions, ?> ctx) {
- return new StringRestrictionsImpl(ctx);
- }
-
- @Override
- public EffectiveStatement<String, StringRestrictions> createEffective(
- final StmtContext<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> ctx) {
- return new StringRestrictionsEffectiveStatementImpl(ctx);
- }
-
- @Override
- protected SubstatementValidator getSubstatementValidator() {
- return SUBSTATEMENT_VALIDATOR;
- }
- }
-
- @Nonnull
- @Override
- public String getName() {
- return argument();
- }
-
- @Override
- public LengthStatement getLength() {
- return firstDeclared(LengthStatement.class);
- }
-
- @Nonnull
- @Override
- public Collection<? extends PatternStatement> getPatterns() {
- return allDeclared(PatternStatement.class);
- }
-}