summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
9be4876)
This patch moves invocation of the validator back into AbstractStatementSupport,
rendering majority of overrides useless, as all they did was call (then no-op)
super and then the validator.
This also fixes problems if a subclass redefines the validator to be non-existent
and fails to override (again) onFullDefinitionDeclared().
Drive-by cleanup reduces verbosity of specification implementation classes by
importing the nested interface directly.
The end effect is that it is again possible to reason about hooks being performed
in statements by looking at what implementation overrides there are.
Change-Id: Ibed4cd5eeb128e69637fcf124331aeeeaeb7b4ea
Signed-off-by: Robert Varga <rovarga@cisco.com>
81 files changed:
*/
@Override
public void onFullDefinitionDeclared(final StmtContext.Mutable<A, D, E> stmt) {
*/
@Override
public void onFullDefinitionDeclared(final StmtContext.Mutable<A, D, E> stmt) {
- // NOOP for most implementations
+ final SubstatementValidator validator = getSubstatementValidator();
+ if (validator != null) {
+ validator.validate(stmt);
+ }
@Override
public void onFullDefinitionDeclared(
final Mutable<SchemaNodeIdentifier, UnknownStatement<SchemaNodeIdentifier>, EffectiveStatement<SchemaNodeIdentifier, UnknownStatement<SchemaNodeIdentifier>>> stmt) {
@Override
public void onFullDefinitionDeclared(
final Mutable<SchemaNodeIdentifier, UnknownStatement<SchemaNodeIdentifier>, EffectiveStatement<SchemaNodeIdentifier, UnknownStatement<SchemaNodeIdentifier>>> stmt) {
- getSubstatementValidator().validate(stmt);
+ super.onFullDefinitionDeclared(stmt);
stmt.getParentContext().addToNs(AnyxmlSchemaLocationNamespace.class,
SupportedExtensionsMapping.ANYXML_SCHEMA_LOCATION, stmt);
}
stmt.getParentContext().addToNs(AnyxmlSchemaLocationNamespace.class,
SupportedExtensionsMapping.ANYXML_SCHEMA_LOCATION, stmt);
}
return new AnyXmlEffectiveStatementImpl(ctx);
}
return new AnyXmlEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, AnyxmlStatement,
- EffectiveStatement<QName, AnyxmlStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
- private Optional<ContainerSchemaNode> getAnyXmlSchema(
+ private static Optional<ContainerSchemaNode> getAnyXmlSchema(
final StmtContext<QName, AnyxmlStatement, EffectiveStatement<QName, AnyxmlStatement>> ctx,
final SchemaNodeIdentifier contentSchemaPath) {
final StatementContextBase<?, ?, ?> findNode = Utils.findNode(ctx.getRoot(), contentSchemaPath);
final StmtContext<QName, AnyxmlStatement, EffectiveStatement<QName, AnyxmlStatement>> ctx,
final SchemaNodeIdentifier contentSchemaPath) {
final StatementContextBase<?, ?, ?> findNode = Utils.findNode(ctx.getRoot(), contentSchemaPath);
return new ArgumentEffectiveStatementImpl(ctx);
}
return new ArgumentEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, ArgumentStatement,
- EffectiveStatement<QName, ArgumentStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- getSubstatementValidator().validate(augmentNode);
+ super.onFullDefinitionDeclared(augmentNode);
if (StmtContextUtils.isInExtensionBody(augmentNode)) {
return;
if (StmtContextUtils.isInExtensionBody(augmentNode)) {
return;
- @Override
- public void onFullDefinitionDeclared(
- final Mutable<QName, BaseStatement, EffectiveStatement<QName, BaseStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
Optional.of(SimpleDateFormatUtil.DEFAULT_BELONGS_TO_DATE));
}
Optional.of(SimpleDateFormatUtil.DEFAULT_BELONGS_TO_DATE));
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, BelongsToStatement,
- EffectiveStatement<String, BelongsToStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new BitEffectiveStatementImpl(ctx);
}
return new BitEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, BitStatement,
- EffectiveStatement<QName, BitStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new BitsSpecificationEffectiveStatementImpl(ctx);
}
return new BitsSpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, BitsSpecification,
- EffectiveStatement<String, BitsSpecification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new CaseEffectiveStatementImpl(ctx);
}
return new CaseEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, CaseStatement,
- EffectiveStatement<QName, CaseStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new ChoiceEffectiveStatementImpl(ctx);
}
return new ChoiceEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, ChoiceStatement,
- EffectiveStatement<QName, ChoiceStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<Boolean, ConfigStatement,
- EffectiveStatement<Boolean, ConfigStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- protected ContactStatementImpl(StmtContext<String, ContactStatement,?> context) {
+ protected ContactStatementImpl(final StmtContext<String, ContactStatement,?> context) {
- public static class Definition extends AbstractStatementSupport<String,ContactStatement,EffectiveStatement<String,ContactStatement>> {
+ public static class Definition extends
+ AbstractStatementSupport<String, ContactStatement,EffectiveStatement<String, ContactStatement>> {
public Definition() {
super(YangStmtMapping.CONTACT);
}
@Override
public Definition() {
super(YangStmtMapping.CONTACT);
}
@Override
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
return value;
}
@Override
- public ContactStatement createDeclared(StmtContext<String, ContactStatement, ?> ctx) {
+ public ContactStatement createDeclared(final StmtContext<String, ContactStatement, ?> ctx) {
return new ContactStatementImpl(ctx);
}
@Override
return new ContactStatementImpl(ctx);
}
@Override
- public EffectiveStatement<String, ContactStatement> createEffective(StmtContext<String, ContactStatement, EffectiveStatement<String, ContactStatement>> ctx) {
+ public EffectiveStatement<String, ContactStatement> createEffective(
+ final StmtContext<String, ContactStatement, EffectiveStatement<String, ContactStatement>> ctx) {
return new ContactEffectiveStatementImpl(ctx);
}
return new ContactEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, ContactStatement,
- EffectiveStatement<String, ContactStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- public void onFullDefinitionDeclared(final Mutable<QName, ContainerStatement,
- EffectiveStatement<QName, ContainerStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
return new Decimal64SpecificationEffectiveStatementImpl(ctx);
}
return new Decimal64SpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, Decimal64Specification,
- EffectiveStatement<String, Decimal64Specification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected DefaultStatementImpl(
.build();
protected DefaultStatementImpl(
- StmtContext<String, DefaultStatement, ?> context) {
+ final StmtContext<String, DefaultStatement, ?> context) {
super(YangStmtMapping.DEFAULT);
}
super(YangStmtMapping.DEFAULT);
}
- @Override public String parseArgumentValue(
- StmtContext<?, ?, ?> ctx, String value) {
+ @Override
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
- @Override public DefaultStatement createDeclared(
- StmtContext<String, DefaultStatement, ?> ctx) {
+ @Override
+ public DefaultStatement createDeclared(final StmtContext<String, DefaultStatement, ?> ctx) {
return new DefaultStatementImpl(ctx);
}
return new DefaultStatementImpl(ctx);
}
- @Override public EffectiveStatement<String, DefaultStatement> createEffective(
- StmtContext<String, DefaultStatement, EffectiveStatement<String, DefaultStatement>> ctx) {
- return new DefaultEffectiveStatementImpl(ctx);
- }
-
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, DefaultStatement,
- EffectiveStatement<String, DefaultStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
+ public EffectiveStatement<String, DefaultStatement> createEffective(
+ final StmtContext<String, DefaultStatement, EffectiveStatement<String, DefaultStatement>> ctx) {
+ return new DefaultEffectiveStatementImpl(ctx);
.build();
protected DescriptionStatementImpl(
.build();
protected DescriptionStatementImpl(
- StmtContext<String, DescriptionStatement, ?> context) {
+ final StmtContext<String, DescriptionStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
return value;
}
@Override
- public DescriptionStatement createDeclared(StmtContext<String, DescriptionStatement, ?> ctx) {
+ public DescriptionStatement createDeclared(final StmtContext<String, DescriptionStatement, ?> ctx) {
return new DescriptionStatementImpl(ctx);
}
@Override
return new DescriptionStatementImpl(ctx);
}
@Override
- public EffectiveStatement<String, DescriptionStatement> createEffective(StmtContext<String, DescriptionStatement, EffectiveStatement<String, DescriptionStatement>> ctx) {
+ public EffectiveStatement<String, DescriptionStatement> createEffective(final StmtContext<String, DescriptionStatement, EffectiveStatement<String, DescriptionStatement>> ctx) {
return new DescriptionEffectiveStatementImpl(ctx);
}
return new DescriptionEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, DescriptionStatement,
- EffectiveStatement<String, DescriptionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new DeviateEffectiveStatementImpl(ctx);
}
return new DeviateEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<DeviateKind, DeviateStatement,
- EffectiveStatement<DeviateKind, DeviateStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new DeviationEffectiveStatementImpl(ctx);
}
return new DeviationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<SchemaNodeIdentifier, DeviationStatement,
- EffectiveStatement<SchemaNodeIdentifier, DeviationStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new EnumSpecificationEffectiveStatementImpl(ctx);
}
return new EnumSpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, EnumSpecification,
- EffectiveStatement<String, EnumSpecification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new EnumEffectiveStatementImpl(ctx);
}
return new EnumEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, EnumStatement,
- EffectiveStatement<String, EnumStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected ErrorAppTagStatementImpl(
.build();
protected ErrorAppTagStatementImpl(
- StmtContext<String, ErrorAppTagStatement, ?> context) {
+ final StmtContext<String, ErrorAppTagStatement, ?> context) {
- public static class Definition
- extends
+ public static class Definition extends
AbstractStatementSupport<String, ErrorAppTagStatement, EffectiveStatement<String, ErrorAppTagStatement>> {
public Definition() {
AbstractStatementSupport<String, ErrorAppTagStatement, EffectiveStatement<String, ErrorAppTagStatement>> {
public Definition() {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
public ErrorAppTagStatement createDeclared(
return value;
}
@Override
public ErrorAppTagStatement createDeclared(
- StmtContext<String, ErrorAppTagStatement, ?> ctx) {
+ final StmtContext<String, ErrorAppTagStatement, ?> ctx) {
return new ErrorAppTagStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, ErrorAppTagStatement> createEffective(
return new ErrorAppTagStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, ErrorAppTagStatement> createEffective(
- StmtContext<String, ErrorAppTagStatement, EffectiveStatement<String, ErrorAppTagStatement>> ctx) {
+ final StmtContext<String, ErrorAppTagStatement, EffectiveStatement<String, ErrorAppTagStatement>> ctx) {
return new ErrorAppTagEffectiveStatementImpl(ctx);
}
return new ErrorAppTagEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, ErrorAppTagStatement,
- EffectiveStatement<String, ErrorAppTagStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected ErrorMessageStatementImpl(
.build();
protected ErrorMessageStatementImpl(
- StmtContext<String, ErrorMessageStatement, ?> context) {
+ final StmtContext<String, ErrorMessageStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
public ErrorMessageStatement createDeclared(
return value;
}
@Override
public ErrorMessageStatement createDeclared(
- StmtContext<String, ErrorMessageStatement, ?> ctx) {
+ final StmtContext<String, ErrorMessageStatement, ?> ctx) {
return new ErrorMessageStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, ErrorMessageStatement> createEffective(
return new ErrorMessageStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, ErrorMessageStatement> createEffective(
- StmtContext<String, ErrorMessageStatement, EffectiveStatement<String, ErrorMessageStatement>> ctx) {
+ final StmtContext<String, ErrorMessageStatement, EffectiveStatement<String, ErrorMessageStatement>> ctx) {
return new ErrorMessageEffectiveStatementImpl(ctx);
}
return new ErrorMessageEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, ErrorMessageStatement,
- EffectiveStatement<String, ErrorMessageStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
yinElement != null ? yinElement.getStatementArgument() : false)));
}
yinElement != null ? yinElement.getStatementArgument() : false)));
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, ExtensionStatement,
- EffectiveStatement<QName, ExtensionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new FeatureEffectiveStatementImpl(ctx);
}
return new FeatureEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, FeatureStatement,
- EffectiveStatement<QName, FeatureStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new FractionDigitsEffectiveStatementImpl(ctx);
}
return new FractionDigitsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<Integer, FractionDigitsStatement,
- EffectiveStatement<Integer, FractionDigitsStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
public void onFullDefinitionDeclared(final Mutable<QName, GroupingStatement,
EffectiveStatement<QName, GroupingStatement>> stmt) {
@Override
public void onFullDefinitionDeclared(final Mutable<QName, GroupingStatement,
EffectiveStatement<QName, GroupingStatement>> stmt) {
- getSubstatementValidator().validate(stmt);
+ super.onFullDefinitionDeclared(stmt);
if (stmt != null && stmt.getParentContext() != null) {
stmt.getParentContext().addContext(GroupingNamespace.class, stmt.getStatementArgument(), stmt);
if (stmt != null && stmt.getParentContext() != null) {
stmt.getParentContext().addContext(GroupingNamespace.class, stmt.getStatementArgument(), stmt);
@Override
public void onFullDefinitionDeclared(final StmtContext.Mutable<String, IdentityRefSpecification,
EffectiveStatement<String, IdentityRefSpecification>> stmt) {
@Override
public void onFullDefinitionDeclared(final StmtContext.Mutable<String, IdentityRefSpecification,
EffectiveStatement<String, IdentityRefSpecification>> stmt) {
- getSubstatementValidator().validate(stmt);
super.onFullDefinitionDeclared(stmt);
final StmtContext<QName, ?, ?> baseStmt = StmtContextUtils.findFirstDeclaredSubstatement(stmt,
super.onFullDefinitionDeclared(stmt);
final StmtContext<QName, ?, ?> baseStmt = StmtContextUtils.findFirstDeclaredSubstatement(stmt,
stmt.addToNs(IdentityNamespace.class, stmt.getStatementArgument(), stmt);
}
stmt.addToNs(IdentityNamespace.class, stmt.getStatementArgument(), stmt);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, IdentityStatement,
- EffectiveStatement<QName, IdentityStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected IfFeatureStatementImpl(
.build();
protected IfFeatureStatementImpl(
- StmtContext<QName, IfFeatureStatement, ?> context) {
+ final StmtContext<QName, IfFeatureStatement, ?> context) {
- public QName parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public QName parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return Utils.qNameFromArgument(ctx, value);
}
@Override
public IfFeatureStatement createDeclared(
return Utils.qNameFromArgument(ctx, value);
}
@Override
public IfFeatureStatement createDeclared(
- StmtContext<QName, IfFeatureStatement, ?> ctx) {
+ final StmtContext<QName, IfFeatureStatement, ?> ctx) {
return new IfFeatureStatementImpl(ctx);
}
@Override
public EffectiveStatement<QName, IfFeatureStatement> createEffective(
return new IfFeatureStatementImpl(ctx);
}
@Override
public EffectiveStatement<QName, IfFeatureStatement> createEffective(
- StmtContext<QName, IfFeatureStatement, EffectiveStatement<QName, IfFeatureStatement>> ctx) {
+ final StmtContext<QName, IfFeatureStatement, EffectiveStatement<QName, IfFeatureStatement>> ctx) {
return new IfFeatureEffectiveStatementImpl(ctx);
}
return new IfFeatureEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<QName, IfFeatureStatement,
- EffectiveStatement<QName, IfFeatureStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new ImportEffectiveStatementImpl(ctx);
}
return new ImportEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final Mutable<String, ImportStatement, EffectiveStatement<String, ImportStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
public void onPreLinkageDeclared(final Mutable<String, ImportStatement, EffectiveStatement<String, ImportStatement>> stmt) {
final String moduleName = stmt.getStatementArgument();
@Override
public void onPreLinkageDeclared(final Mutable<String, ImportStatement, EffectiveStatement<String, ImportStatement>> stmt) {
final String moduleName = stmt.getStatementArgument();
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
- public void onFullDefinitionDeclared(final Mutable<String, IncludeStatement,
- EffectiveStatement<String, IncludeStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
return new InputEffectiveStatementImpl(ctx);
}
return new InputEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, InputStatement,
- EffectiveStatement<QName, InputStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
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.RequireInstanceStatement;
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.RequireInstanceStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.InstanceIdentifierSpecification;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
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.SubstatementValidator;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.InstanceIdentifierSpecificationEffectiveStatementImpl;
public class InstanceIdentifierSpecificationImpl extends
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.InstanceIdentifierSpecificationEffectiveStatementImpl;
public class InstanceIdentifierSpecificationImpl extends
- AbstractDeclaredStatement<String> implements
- TypeStatement.InstanceIdentifierSpecification {
+ AbstractDeclaredStatement<String> implements InstanceIdentifierSpecification {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addOptional(YangStmtMapping.REQUIRE_INSTANCE)
.build();
protected InstanceIdentifierSpecificationImpl(
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addOptional(YangStmtMapping.REQUIRE_INSTANCE)
.build();
protected InstanceIdentifierSpecificationImpl(
- final StmtContext<String, TypeStatement.InstanceIdentifierSpecification, ?> ctx) {
+ final StmtContext<String, InstanceIdentifierSpecification, ?> ctx) {
super(ctx);
}
public static class Definition
extends
super(ctx);
}
public static class Definition
extends
- AbstractStatementSupport<String, TypeStatement.InstanceIdentifierSpecification, EffectiveStatement<String, TypeStatement.InstanceIdentifierSpecification>> {
+ AbstractStatementSupport<String, InstanceIdentifierSpecification, EffectiveStatement<String, InstanceIdentifierSpecification>> {
public Definition() {
super(YangStmtMapping.TYPE);
public Definition() {
super(YangStmtMapping.TYPE);
- public TypeStatement.InstanceIdentifierSpecification createDeclared(
- final StmtContext<String, TypeStatement.InstanceIdentifierSpecification, ?> ctx) {
+ public InstanceIdentifierSpecification createDeclared(
+ final StmtContext<String, InstanceIdentifierSpecification, ?> ctx) {
return new InstanceIdentifierSpecificationImpl(ctx);
}
@Override
return new InstanceIdentifierSpecificationImpl(ctx);
}
@Override
- public EffectiveStatement<String, TypeStatement.InstanceIdentifierSpecification> createEffective(
- final StmtContext<String, TypeStatement.InstanceIdentifierSpecification, EffectiveStatement<String, TypeStatement.InstanceIdentifierSpecification>> ctx) {
+ public EffectiveStatement<String, InstanceIdentifierSpecification> createEffective(
+ final StmtContext<String, InstanceIdentifierSpecification, EffectiveStatement<String, InstanceIdentifierSpecification>> ctx) {
return new InstanceIdentifierSpecificationEffectiveStatementImpl(ctx);
}
return new InstanceIdentifierSpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, InstanceIdentifierSpecification,
- EffectiveStatement<String, InstanceIdentifierSpecification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new KeyEffectiveStatementImpl(ctx);
}
return new KeyEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<Collection<SchemaNodeIdentifier>, KeyStatement,
- EffectiveStatement<Collection<SchemaNodeIdentifier>, KeyStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new LeafListEffectiveStatementImpl(ctx);
}
return new LeafListEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, LeafListStatement,
- EffectiveStatement<QName, LeafListStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
stmt.getParentContext().addToNs(ChildSchemaNodes.class, stmt.getStatementArgument(), stmt);
}
stmt.getParentContext().addToNs(ChildSchemaNodes.class, stmt.getStatementArgument(), stmt);
}
- @Override public LeafStatement createDeclared(
- final StmtContext<QName, LeafStatement, ?> ctx) {
+ @Override
+ public LeafStatement createDeclared(final StmtContext<QName, LeafStatement, ?> ctx) {
return new LeafStatementImpl(ctx);
}
return new LeafStatementImpl(ctx);
}
- @Override public EffectiveStatement<QName, LeafStatement> createEffective(
+ @Override
+ public EffectiveStatement<QName, LeafStatement> createEffective(
final StmtContext<QName, LeafStatement, EffectiveStatement<QName, LeafStatement>> ctx) {
return new LeafEffectiveStatementImpl(ctx);
}
final StmtContext<QName, LeafStatement, EffectiveStatement<QName, LeafStatement>> ctx) {
return new LeafEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, LeafStatement,
- EffectiveStatement<QName, LeafStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
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.PathStatement;
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.PathStatement;
-import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.LeafrefSpecification;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
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.SubstatementValidator;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.LeafrefSpecificationEffectiveStatementImpl;
public class LeafrefSpecificationImpl extends AbstractDeclaredStatement<String>
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.LeafrefSpecificationEffectiveStatementImpl;
public class LeafrefSpecificationImpl extends AbstractDeclaredStatement<String>
- implements TypeStatement.LeafrefSpecification {
+ implements LeafrefSpecification {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMandatory(YangStmtMapping.PATH)
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMandatory(YangStmtMapping.PATH)
.build();
protected LeafrefSpecificationImpl(
.build();
protected LeafrefSpecificationImpl(
- final StmtContext<String, TypeStatement.LeafrefSpecification, ?> context) {
+ final StmtContext<String, LeafrefSpecification, ?> context) {
super(context);
}
public static class Definition
extends
super(context);
}
public static class Definition
extends
- AbstractStatementSupport<String, TypeStatement.LeafrefSpecification, EffectiveStatement<String, TypeStatement.LeafrefSpecification>> {
+ AbstractStatementSupport<String, LeafrefSpecification, EffectiveStatement<String, LeafrefSpecification>> {
public Definition() {
super(YangStmtMapping.TYPE);
public Definition() {
super(YangStmtMapping.TYPE);
- public TypeStatement.LeafrefSpecification createDeclared(
- final StmtContext<String, TypeStatement.LeafrefSpecification, ?> ctx) {
+ public LeafrefSpecification createDeclared(final StmtContext<String, LeafrefSpecification, ?> ctx) {
return new LeafrefSpecificationImpl(ctx);
}
@Override
return new LeafrefSpecificationImpl(ctx);
}
@Override
- public EffectiveStatement<String, TypeStatement.LeafrefSpecification> createEffective(
- final StmtContext<String, TypeStatement.LeafrefSpecification, EffectiveStatement<String, TypeStatement.LeafrefSpecification>> ctx) {
+ public EffectiveStatement<String, LeafrefSpecification> createEffective(
+ final StmtContext<String, LeafrefSpecification, EffectiveStatement<String, LeafrefSpecification>> ctx) {
return new LeafrefSpecificationEffectiveStatementImpl(ctx);
}
return new LeafrefSpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, LeafrefSpecification,
- EffectiveStatement<String, LeafrefSpecification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new LengthEffectiveStatementImpl(ctx);
}
return new LengthEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<List<LengthConstraint>,
- LengthStatement, EffectiveStatement<List<LengthConstraint>, LengthStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new ListEffectiveStatementImpl(ctx);
}
return new ListEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, ListStatement,
- EffectiveStatement<QName, ListStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<Boolean, MandatoryStatement,
- EffectiveStatement<Boolean, MandatoryStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected MaxElementsStatementImpl(
.build();
protected MaxElementsStatementImpl(
- StmtContext<String, MaxElementsStatement, ?> context) {
+ final StmtContext<String, MaxElementsStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
public MaxElementsStatement createDeclared(
return value;
}
@Override
public MaxElementsStatement createDeclared(
- StmtContext<String, MaxElementsStatement, ?> ctx) {
+ final StmtContext<String, MaxElementsStatement, ?> ctx) {
return new MaxElementsStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, MaxElementsStatement> createEffective(
return new MaxElementsStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, MaxElementsStatement> createEffective(
- StmtContext<String, MaxElementsStatement, EffectiveStatement<String, MaxElementsStatement>> ctx) {
+ final StmtContext<String, MaxElementsStatement, EffectiveStatement<String, MaxElementsStatement>> ctx) {
return new MaxElementsEffectiveStatementImpl(ctx);
}
return new MaxElementsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, MaxElementsStatement,
- EffectiveStatement<String, MaxElementsStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.build();
protected MinElementsStatementImpl(
.build();
protected MinElementsStatementImpl(
- StmtContext<Integer, MinElementsStatement, ?> context) {
+ final StmtContext<Integer, MinElementsStatement, ?> context) {
- public Integer parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public Integer parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return Integer.parseInt(value);
}
@Override
public MinElementsStatement createDeclared(
return Integer.parseInt(value);
}
@Override
public MinElementsStatement createDeclared(
- StmtContext<Integer, MinElementsStatement, ?> ctx) {
+ final StmtContext<Integer, MinElementsStatement, ?> ctx) {
return new MinElementsStatementImpl(ctx);
}
@Override
public EffectiveStatement<Integer, MinElementsStatement> createEffective(
return new MinElementsStatementImpl(ctx);
}
@Override
public EffectiveStatement<Integer, MinElementsStatement> createEffective(
- StmtContext<Integer, MinElementsStatement, EffectiveStatement<Integer, MinElementsStatement>> ctx) {
+ final StmtContext<Integer, MinElementsStatement, EffectiveStatement<Integer, MinElementsStatement>> ctx) {
return new MinElementsEffectiveStatementImpl(ctx);
}
return new MinElementsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<Integer, MinElementsStatement,
- EffectiveStatement<Integer, MinElementsStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- public void onFullDefinitionDeclared(final Mutable<String, ModuleStatement,
- EffectiveStatement<String, ModuleStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
return new MustEffectiveStatementImpl(ctx);
}
return new MustEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<RevisionAwareXPath, MustStatement,
- EffectiveStatement<RevisionAwareXPath, MustStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- public URI parseArgumentValue(StmtContext<?, ?,?> ctx, String value) {
+ public URI parseArgumentValue(final StmtContext<?, ?,?> ctx, final String value) {
return URI.create(value);
}
@Override
return URI.create(value);
}
@Override
- public NamespaceStatement createDeclared(StmtContext<URI, NamespaceStatement,?> ctx) {
+ public NamespaceStatement createDeclared(final StmtContext<URI, NamespaceStatement,?> ctx) {
return new NamespaceStatementImpl(ctx);
}
@Override
return new NamespaceStatementImpl(ctx);
}
@Override
- public EffectiveStatement<URI,NamespaceStatement> createEffective(StmtContext<URI, NamespaceStatement,EffectiveStatement<URI,NamespaceStatement>> ctx) {
+ public EffectiveStatement<URI,NamespaceStatement> createEffective(final StmtContext<URI, NamespaceStatement,EffectiveStatement<URI,NamespaceStatement>> ctx) {
return new NamespaceEffectiveStatementImpl(ctx);
}
return new NamespaceEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<URI, NamespaceStatement,
- EffectiveStatement<URI, NamespaceStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
}
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
}
- NamespaceStatementImpl(StmtContext<URI, NamespaceStatement,?> context) {
+ NamespaceStatementImpl(final StmtContext<URI, NamespaceStatement,?> context) {
return new NotificationEffectiveStatementImpl(ctx);
}
return new NotificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, NotificationStatement,
- EffectiveStatement<QName, NotificationStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
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.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;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.NumericalRestrictions;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
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.stmt.rfc6020.effective.type.NumericalRestrictionsEffectiveStatementImpl;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
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.stmt.rfc6020.effective.type.NumericalRestrictionsEffectiveStatementImpl;
-public class NumericalRestrictionsImpl extends AbstractDeclaredStatement<String> implements
- TypeStatement.NumericalRestrictions {
+public class NumericalRestrictionsImpl extends AbstractDeclaredStatement<String> implements NumericalRestrictions {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMandatory(YangStmtMapping.RANGE)
.build();
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMandatory(YangStmtMapping.RANGE)
.build();
- protected NumericalRestrictionsImpl(final StmtContext<String, TypeStatement.NumericalRestrictions, ?> context) {
+ protected NumericalRestrictionsImpl(final StmtContext<String, NumericalRestrictions, ?> context) {
super(context);
}
public static class Definition extends
super(context);
}
public static class Definition extends
- AbstractStatementSupport<String, TypeStatement.NumericalRestrictions, EffectiveStatement<String, TypeStatement.NumericalRestrictions>> {
+ AbstractStatementSupport<String, NumericalRestrictions, EffectiveStatement<String, NumericalRestrictions>> {
public Definition() {
super(YangStmtMapping.TYPE);
public Definition() {
super(YangStmtMapping.TYPE);
- public TypeStatement.NumericalRestrictions createDeclared(
- final StmtContext<String, TypeStatement.NumericalRestrictions, ?> ctx) {
+ public NumericalRestrictions createDeclared(final StmtContext<String, NumericalRestrictions, ?> ctx) {
return new NumericalRestrictionsImpl(ctx);
}
@Override
return new NumericalRestrictionsImpl(ctx);
}
@Override
- public EffectiveStatement<String, TypeStatement.NumericalRestrictions> createEffective(
- final StmtContext<String, TypeStatement.NumericalRestrictions, EffectiveStatement<String, TypeStatement.NumericalRestrictions>> ctx) {
+ public EffectiveStatement<String, NumericalRestrictions> createEffective(
+ final StmtContext<String, NumericalRestrictions, EffectiveStatement<String, NumericalRestrictions>> ctx) {
return new NumericalRestrictionsEffectiveStatementImpl(ctx);
}
return new NumericalRestrictionsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, NumericalRestrictions,
- EffectiveStatement<String, NumericalRestrictions>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OrderedByEffectiveStatementImpl;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OrderedByEffectiveStatementImpl;
-public class OrderedByStatementImpl extends AbstractDeclaredStatement<String>
- implements OrderedByStatement {
+public class OrderedByStatementImpl extends AbstractDeclaredStatement<String> implements OrderedByStatement {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.ORDERED_BY)
.build();
protected OrderedByStatementImpl(
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.ORDERED_BY)
.build();
protected OrderedByStatementImpl(
- StmtContext<String, OrderedByStatement, ?> context) {
+ final StmtContext<String, OrderedByStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
return value;
}
@Override
- public OrderedByStatement createDeclared(StmtContext<String, OrderedByStatement, ?> ctx) {
+ public OrderedByStatement createDeclared(final StmtContext<String, OrderedByStatement, ?> ctx) {
return new OrderedByStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, OrderedByStatement> createEffective(
return new OrderedByStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, OrderedByStatement> createEffective(
- StmtContext<String, OrderedByStatement, EffectiveStatement<String, OrderedByStatement>> ctx) {
+ final StmtContext<String, OrderedByStatement, EffectiveStatement<String, OrderedByStatement>> ctx) {
return new OrderedByEffectiveStatementImpl(ctx);
}
return new OrderedByEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, OrderedByStatement,
- EffectiveStatement<String, OrderedByStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OrganizationEffectiveStatementImpl;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.OrganizationEffectiveStatementImpl;
-public class OrganizationStatementImpl extends
- AbstractDeclaredStatement<String> implements OrganizationStatement {
+public class OrganizationStatementImpl extends AbstractDeclaredStatement<String> implements OrganizationStatement {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.ORGANIZATION)
.build();
protected OrganizationStatementImpl(
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.ORGANIZATION)
.build();
protected OrganizationStatementImpl(
- StmtContext<String, OrganizationStatement, ?> context) {
+ final StmtContext<String, OrganizationStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
public OrganizationStatement createDeclared(
return value;
}
@Override
public OrganizationStatement createDeclared(
- StmtContext<String, OrganizationStatement, ?> ctx) {
+ final StmtContext<String, OrganizationStatement, ?> ctx) {
return new OrganizationStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, OrganizationStatement> createEffective(
return new OrganizationStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, OrganizationStatement> createEffective(
- StmtContext<String, OrganizationStatement, EffectiveStatement<String, OrganizationStatement>> ctx) {
+ final StmtContext<String, OrganizationStatement, EffectiveStatement<String, OrganizationStatement>> ctx) {
return new OrganizationEffectiveStatementImpl(ctx);
}
return new OrganizationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, OrganizationStatement,
- EffectiveStatement<String, OrganizationStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new OutputEffectiveStatementImpl(ctx);
}
return new OutputEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, OutputStatement,
- EffectiveStatement<QName, OutputStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new PathEffectiveStatementImpl(ctx);
}
return new PathEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<RevisionAwareXPath, PathStatement,
- EffectiveStatement<RevisionAwareXPath, PathStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new PatternEffectiveStatementImpl(ctx);
}
return new PatternEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<PatternConstraint, PatternStatement,
- EffectiveStatement<PatternConstraint, PatternStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
*/
package org.opendaylight.yangtools.yang.parser.stmt.rfc6020;
*/
package org.opendaylight.yangtools.yang.parser.stmt.rfc6020;
-import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
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.PositionStatement;
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.PositionStatement;
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.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.source.SourceException;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.PositionEffectiveStatementImpl;
public class PositionStatementImpl extends AbstractDeclaredStatement<Long> implements PositionStatement {
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.PositionEffectiveStatementImpl;
public class PositionStatementImpl extends AbstractDeclaredStatement<Long> implements PositionStatement {
return new PositionEffectiveStatementImpl(ctx);
}
return new PositionEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final StmtContext.Mutable<Long, PositionStatement, EffectiveStatement<Long, PositionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- public static class Definition extends AbstractStatementSupport<String,PrefixStatement,EffectiveStatement<String,PrefixStatement>> {
+ public static class Definition
+ extends AbstractStatementSupport<String, PrefixStatement, EffectiveStatement<String, PrefixStatement>> {
public Definition() {
super(YangStmtMapping.PREFIX);
}
@Override
public Definition() {
super(YangStmtMapping.PREFIX);
}
@Override
- public String parseArgumentValue(StmtContext<?, ?,?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?,?> ctx, final String value) {
return value;
}
@Override
return value;
}
@Override
- public PrefixStatement createDeclared(StmtContext<String, PrefixStatement,?> ctx) {
+ public PrefixStatement createDeclared(final StmtContext<String, PrefixStatement,?> ctx) {
return new PrefixStatementImpl(ctx);
}
@Override
return new PrefixStatementImpl(ctx);
}
@Override
- public EffectiveStatement<String,PrefixStatement> createEffective(StmtContext<String, PrefixStatement,EffectiveStatement<String,PrefixStatement>> ctx) {
+ public EffectiveStatement<String,PrefixStatement> createEffective(
+ final StmtContext<String, PrefixStatement, EffectiveStatement<String, PrefixStatement>> ctx) {
return new PrefixEffectiveStatementImpl(ctx);
}
return new PrefixEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, PrefixStatement,
- EffectiveStatement<String, PrefixStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
}
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
}
}
- PrefixStatementImpl(StmtContext<String, PrefixStatement,?> context) {
+ PrefixStatementImpl(final StmtContext<String, PrefixStatement,?> context) {
- protected PresenceStatementImpl(StmtContext<String, PresenceStatement, ?> context) {
+ protected PresenceStatementImpl(final StmtContext<String, PresenceStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
return value;
}
@Override
- public PresenceStatement createDeclared(StmtContext<String, PresenceStatement, ?> ctx) {
+ public PresenceStatement createDeclared(final StmtContext<String, PresenceStatement, ?> ctx) {
return new PresenceStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, PresenceStatement> createEffective(
return new PresenceStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, PresenceStatement> createEffective(
- StmtContext<String, PresenceStatement, EffectiveStatement<String, PresenceStatement>> ctx) {
+ final StmtContext<String, PresenceStatement, EffectiveStatement<String, PresenceStatement>> ctx) {
return new PresenceEffectiveStatementImpl(ctx);
}
return new PresenceEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, PresenceStatement,
- EffectiveStatement<String, PresenceStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RangeEffectiveStatementImpl(ctx);
}
return new RangeEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<List<RangeConstraint>, RangeStatement,
- EffectiveStatement<List<RangeConstraint>, RangeStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new ReferenceEffectiveStatementImpl(ctx);
}
return new ReferenceEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, ReferenceStatement,
- EffectiveStatement<String, ReferenceStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RefineEffectiveStatementImpl(ctx);
}
return new RefineEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<SchemaNodeIdentifier, RefineStatement,
- EffectiveStatement<SchemaNodeIdentifier, RefineStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RequireInstanceEffectiveStatementImpl(ctx);
}
return new RequireInstanceEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<Boolean, RequireInstanceStatement,
- EffectiveStatement<Boolean, RequireInstanceStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RevisionDateEffectiveStatementImpl(ctx);
}
return new RevisionDateEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final StmtContext.Mutable<Date, RevisionDateStatement, EffectiveStatement<Date, RevisionDateStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RevisionEffectiveStatementImpl(ctx);
}
return new RevisionEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final StmtContext.Mutable<Date, RevisionStatement, EffectiveStatement<Date, RevisionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new RpcEffectiveStatementImpl(ctx);
}
return new RpcEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, RpcStatement, EffectiveStatement<QName, RpcStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
import org.opendaylight.yangtools.yang.parser.spi.meta.SemanticVersionNamespace;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
-import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext.Mutable;
-import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl;
@Beta
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.SemanticVersionEffectiveStatementImpl;
@Beta
stmt.addToNs(SemanticVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument());
}
stmt.addToNs(SemanticVersionNamespace.class, stmt.getParentContext(), stmt.getStatementArgument());
}
- @Override
- public void onFullDefinitionDeclared(
- final Mutable<SemVer, UnknownStatement<SemVer>, EffectiveStatement<SemVer, UnknownStatement<SemVer>>> stmt)
- throws SourceException {
- getSubstatementValidator().validate(stmt);
- }
-
@Override
public UnknownStatement<SemVer> createDeclared(
final StmtContext<SemVer, UnknownStatement<SemVer>, ?> ctx) {
@Override
public UnknownStatement<SemVer> createDeclared(
final StmtContext<SemVer, UnknownStatement<SemVer>, ?> ctx) {
package org.opendaylight.yangtools.yang.parser.stmt.rfc6020;
import javax.annotation.Nonnull;
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.Status;
import org.opendaylight.yangtools.yang.model.api.Status;
+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.StatusStatement;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
import org.opendaylight.yangtools.yang.model.api.meta.EffectiveStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.StatusStatement;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
.build();
protected StatusStatementImpl(
.build();
protected StatusStatementImpl(
- StmtContext<Status, StatusStatement, ?> context) {
+ final StmtContext<Status, StatusStatement, ?> context) {
- public Status parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public Status parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return Utils.parseStatus(value);
}
@Override
public StatusStatement createDeclared(
return Utils.parseStatus(value);
}
@Override
public StatusStatement createDeclared(
- StmtContext<Status, StatusStatement, ?> ctx) {
+ final StmtContext<Status, StatusStatement, ?> ctx) {
return new StatusStatementImpl(ctx);
}
@Override
public EffectiveStatement<Status, StatusStatement> createEffective(
return new StatusStatementImpl(ctx);
}
@Override
public EffectiveStatement<Status, StatusStatement> createEffective(
- StmtContext<Status, StatusStatement, EffectiveStatement<Status, StatusStatement>> ctx) {
+ final StmtContext<Status, StatusStatement, EffectiveStatement<Status, StatusStatement>> ctx) {
return new StatusEffectiveStatementImpl(ctx);
}
return new StatusEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<Status, StatusStatement,
- EffectiveStatement<Status, StatusStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.addAny(YangStmtMapping.PATTERN)
.build();
.addAny(YangStmtMapping.PATTERN)
.build();
- protected StringRestrictionsImpl(final StmtContext<String, TypeStatement.StringRestrictions, ?> context) {
+ protected StringRestrictionsImpl(final StmtContext<String, StringRestrictions, ?> context) {
super(context);
}
public static class Definition
extends
super(context);
}
public static class Definition
extends
- AbstractStatementSupport<String, TypeStatement.StringRestrictions, EffectiveStatement<String, TypeStatement.StringRestrictions>> {
+ AbstractStatementSupport<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> {
public Definition() {
super(YangStmtMapping.TYPE);
public Definition() {
super(YangStmtMapping.TYPE);
- public TypeStatement.StringRestrictions createDeclared(
- final StmtContext<String, TypeStatement.StringRestrictions, ?> ctx) {
+ public StringRestrictions createDeclared(final StmtContext<String, StringRestrictions, ?> ctx) {
return new StringRestrictionsImpl(ctx);
}
@Override
return new StringRestrictionsImpl(ctx);
}
@Override
- public EffectiveStatement<String, TypeStatement.StringRestrictions> createEffective(
- final StmtContext<String, TypeStatement.StringRestrictions, EffectiveStatement<String, TypeStatement.StringRestrictions>> ctx) {
+ public EffectiveStatement<String, StringRestrictions> createEffective(
+ final StmtContext<String, StringRestrictions, EffectiveStatement<String, StringRestrictions>> ctx) {
return new StringRestrictionsEffectiveStatementImpl(ctx);
}
return new StringRestrictionsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, StringRestrictions,
- EffectiveStatement<String, StringRestrictions>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
public Collection<? extends PatternStatement> getPatterns() {
return allDeclared(PatternStatement.class);
}
public Collection<? extends PatternStatement> getPatterns() {
return allDeclared(PatternStatement.class);
}
stmt.addToNs(BelongsToPrefixToModuleName.class, prefix, belongsToModuleName);
}
stmt.addToNs(BelongsToPrefixToModuleName.class, prefix, belongsToModuleName);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<String, SubmoduleStatement,
- EffectiveStatement<String, SubmoduleStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
public void onFullDefinitionDeclared(
final Mutable<String, TypeStatement, EffectiveStatement<String, TypeStatement>> stmt) {
@Override
public void onFullDefinitionDeclared(
final Mutable<String, TypeStatement, EffectiveStatement<String, TypeStatement>> stmt) {
- getSubstatementValidator().validate(stmt);
+ super.onFullDefinitionDeclared(stmt);
// if it is yang built-in type, no prerequisite is needed, so simply return
if (TypeUtils.isYangBuiltInTypeString(stmt.getStatementArgument())) {
// if it is yang built-in type, no prerequisite is needed, so simply return
if (TypeUtils.isYangBuiltInTypeString(stmt.getStatementArgument())) {
public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, TypedefStatement,
EffectiveStatement<QName, TypedefStatement>> stmt) {
super.onFullDefinitionDeclared(stmt);
public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, TypedefStatement,
EffectiveStatement<QName, TypedefStatement>> stmt) {
super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
if (stmt != null && stmt.getParentContext() != null) {
final StmtContext<?, TypedefStatement, TypedefEffectiveStatement> existing = stmt.getParentContext()
.getFromNamespace(TypeNamespace.class, stmt.getStatementArgument());
if (stmt != null && stmt.getParentContext() != null) {
final StmtContext<?, TypedefStatement, TypedefEffectiveStatement> existing = stmt.getParentContext()
.getFromNamespace(TypeNamespace.class, stmt.getStatementArgument());
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;
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;
+import org.opendaylight.yangtools.yang.model.api.stmt.TypeStatement.UnionSpecification;
import org.opendaylight.yangtools.yang.parser.spi.SubstatementValidator;
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.SubstatementValidator;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractDeclaredStatement;
import org.opendaylight.yangtools.yang.parser.spi.meta.AbstractStatementSupport;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.UnionSpecificationEffectiveStatementImpl;
public class UnionSpecificationImpl extends AbstractDeclaredStatement<String>
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.type.UnionSpecificationEffectiveStatementImpl;
public class UnionSpecificationImpl extends AbstractDeclaredStatement<String>
- implements TypeStatement.UnionSpecification {
+ implements UnionSpecification {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMultiple(YangStmtMapping.TYPE)
.build();
protected UnionSpecificationImpl(
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.TYPE)
.addMultiple(YangStmtMapping.TYPE)
.build();
protected UnionSpecificationImpl(
- final StmtContext<String, TypeStatement.UnionSpecification, ?> context) {
+ final StmtContext<String, UnionSpecification, ?> context) {
- public static class Definition extends AbstractStatementSupport<String, TypeStatement.UnionSpecification, EffectiveStatement<String, TypeStatement.UnionSpecification>> {
+ public static class Definition extends
+ AbstractStatementSupport<String, UnionSpecification, EffectiveStatement<String, UnionSpecification>> {
public Definition() {
super(YangStmtMapping.TYPE);
public Definition() {
super(YangStmtMapping.TYPE);
- public TypeStatement.UnionSpecification createDeclared(
- final StmtContext<String, TypeStatement.UnionSpecification, ?> ctx) {
+ public UnionSpecification createDeclared(final StmtContext<String, UnionSpecification, ?> ctx) {
return new UnionSpecificationImpl(ctx);
}
@Override
return new UnionSpecificationImpl(ctx);
}
@Override
- public EffectiveStatement<String, TypeStatement.UnionSpecification> createEffective(
- final StmtContext<String, TypeStatement.UnionSpecification, EffectiveStatement<String, TypeStatement.UnionSpecification>> ctx) {
+ public EffectiveStatement<String, UnionSpecification> createEffective(
+ final StmtContext<String, UnionSpecification, EffectiveStatement<String, UnionSpecification>> ctx) {
return new UnionSpecificationEffectiveStatementImpl(ctx);
}
return new UnionSpecificationEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<String, UnionSpecification, EffectiveStatement<String, UnionSpecification>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.UniqueEffectiveStatementImpl;
import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
import org.opendaylight.yangtools.yang.parser.stmt.rfc6020.effective.UniqueEffectiveStatementImpl;
-public class UniqueStatementImpl extends AbstractDeclaredStatement<Collection<SchemaNodeIdentifier.Relative>> implements UniqueStatement {
+public class UniqueStatementImpl extends AbstractDeclaredStatement<Collection<SchemaNodeIdentifier.Relative>>
+ implements UniqueStatement {
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.UNIQUE)
.build();
private static final SubstatementValidator SUBSTATEMENT_VALIDATOR = SubstatementValidator.builder(YangStmtMapping
.UNIQUE)
.build();
- protected UniqueStatementImpl(StmtContext<Collection<SchemaNodeIdentifier.Relative>, UniqueStatement, ?> context) {
+ protected UniqueStatementImpl(final StmtContext<Collection<SchemaNodeIdentifier.Relative>, UniqueStatement, ?> context) {
- public Collection<SchemaNodeIdentifier.Relative> parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public Collection<SchemaNodeIdentifier.Relative> parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
final Collection<Relative> uniqueConstraints = Utils.parseUniqueConstraintArgument(ctx, value);
SourceException.throwIf(uniqueConstraints.isEmpty(), ctx.getStatementSourceReference(),
"Invalid argument value '%s' of unique statement. The value must contains at least "
final Collection<Relative> uniqueConstraints = Utils.parseUniqueConstraintArgument(ctx, value);
SourceException.throwIf(uniqueConstraints.isEmpty(), ctx.getStatementSourceReference(),
"Invalid argument value '%s' of unique statement. The value must contains at least "
- public UniqueStatement createDeclared(StmtContext<Collection<Relative>, UniqueStatement, ?> ctx) {
+ public UniqueStatement createDeclared(final StmtContext<Collection<Relative>, UniqueStatement, ?> ctx) {
return new UniqueStatementImpl(ctx);
}
@Override
public EffectiveStatement<Collection<Relative>, UniqueStatement> createEffective
return new UniqueStatementImpl(ctx);
}
@Override
public EffectiveStatement<Collection<Relative>, UniqueStatement> createEffective
- (StmtContext<Collection<Relative>, UniqueStatement, EffectiveStatement<Collection<Relative>,
+ (final StmtContext<Collection<Relative>, UniqueStatement, EffectiveStatement<Collection<Relative>,
UniqueStatement>> ctx) {
return new UniqueEffectiveStatementImpl(ctx);
}
UniqueStatement>> ctx) {
return new UniqueEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<Collection<Relative>, UniqueStatement,
- EffectiveStatement<Collection<Relative>, UniqueStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
- protected UnitsStatementImpl(StmtContext<String, UnitsStatement, ?> context) {
+ protected UnitsStatementImpl(final StmtContext<String, UnitsStatement, ?> context) {
- public String parseArgumentValue(StmtContext<?, ?, ?> ctx, String value) {
+ public String parseArgumentValue(final StmtContext<?, ?, ?> ctx, final String value) {
return value;
}
@Override
public UnitsStatement createDeclared(
return value;
}
@Override
public UnitsStatement createDeclared(
- StmtContext<String, UnitsStatement, ?> ctx) {
+ final StmtContext<String, UnitsStatement, ?> ctx) {
return new UnitsStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, UnitsStatement> createEffective(
return new UnitsStatementImpl(ctx);
}
@Override
public EffectiveStatement<String, UnitsStatement> createEffective(
- StmtContext<String, UnitsStatement, EffectiveStatement<String, UnitsStatement>> ctx) {
+ final StmtContext<String, UnitsStatement, EffectiveStatement<String, UnitsStatement>> ctx) {
return new UnitsEffectiveStatementImpl(ctx);
}
return new UnitsEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(StmtContext.Mutable<String, UnitsStatement,
- EffectiveStatement<String, UnitsStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
if (!StmtContextUtils.areFeaturesSupported(usesNode)) {
return;
}
if (!StmtContextUtils.areFeaturesSupported(usesNode)) {
return;
}
-
- getSubstatementValidator().validate(usesNode);
+ super.onFullDefinitionDeclared(usesNode);
if (StmtContextUtils.isInExtensionBody(usesNode)) {
return;
if (StmtContextUtils.isInExtensionBody(usesNode)) {
return;
return new ValueEffectiveStatementImpl(ctx);
}
return new ValueEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final StmtContext.Mutable<Integer, ValueStatement, EffectiveStatement<Integer, ValueStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new WhenEffectiveStatementImpl(ctx);
}
return new WhenEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<RevisionAwareXPath, WhenStatement,
- EffectiveStatement<RevisionAwareXPath, WhenStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new YangVersionEffectiveStatementImpl(ctx);
}
return new YangVersionEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<YangVersion, YangVersionStatement,
- EffectiveStatement<YangVersion, YangVersionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new YinElementEffectiveStatementImpl(ctx);
}
return new YinElementEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<Boolean, YinElementStatement,
- EffectiveStatement<Boolean, YinElementStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
.addOptional(YangStmtMapping.STATUS)
.addAny(YangStmtMapping.TYPEDEF)
.build();
.addOptional(YangStmtMapping.STATUS)
.addAny(YangStmtMapping.TYPEDEF)
.build();
protected ActionStatementImpl(final StmtContext<QName,ActionStatement, ?> context) {
super(context);
}
protected ActionStatementImpl(final StmtContext<QName,ActionStatement, ?> context) {
super(context);
}
public static class Definition
extends AbstractStatementSupport<QName, ActionStatement, EffectiveStatement<QName, ActionStatement>> {
public static class Definition
extends AbstractStatementSupport<QName, ActionStatement, EffectiveStatement<QName, ActionStatement>> {
return new ActionEffectiveStatementImpl(ctx);
}
return new ActionEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final StmtContext.Mutable<QName, ActionStatement,
- EffectiveStatement<QName, ActionStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new AnyDataEffectiveStatementImpl(ctx);
}
return new AnyDataEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(final Mutable<QName, AnydataStatement,
- EffectiveStatement<QName, AnydataStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
return new ModifierEffectiveStatementImpl(ctx);
}
return new ModifierEffectiveStatementImpl(ctx);
}
- @Override
- public void onFullDefinitionDeclared(
- final StmtContext.Mutable<ModifierKind, ModifierStatement, EffectiveStatement<ModifierKind, ModifierStatement>> stmt) {
- super.onFullDefinitionDeclared(stmt);
- getSubstatementValidator().validate(stmt);
- }
-
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
protected SubstatementValidator getSubstatementValidator() {
return SUBSTATEMENT_VALIDATOR;
@Override
public void onFullDefinitionDeclared(
final Mutable<String, UnknownStatement<String>, EffectiveStatement<String, UnknownStatement<String>>> stmt) {
@Override
public void onFullDefinitionDeclared(
final Mutable<String, UnknownStatement<String>, EffectiveStatement<String, UnknownStatement<String>>> stmt) {
+ super.onFullDefinitionDeclared(stmt);
stmt.addToNs(ThirdPartyNamespace.class, stmt, "Third-party namespace test.");
}
stmt.addToNs(ThirdPartyNamespace.class, stmt, "Third-party namespace test.");
}