import org.opendaylight.yangtools.yang.model.api.stmt.StatusStatement;
import org.opendaylight.yangtools.yang.model.api.stmt.TypedefStatement;
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.AbstractQNameStatementSupport;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContextUtils;
import org.opendaylight.yangtools.yang.parser.spi.meta.SubstatementValidator;
}
public static class Definition
- extends AbstractStatementSupport<QName, ActionStatement, EffectiveStatement<QName, ActionStatement>> {
+ extends AbstractQNameStatementSupport<ActionStatement, EffectiveStatement<QName, ActionStatement>> {
private static final Set<StatementDefinition> ILLEGAL_PARENTS = ImmutableSet.of(YangStmtMapping.NOTIFICATION,
YangStmtMapping.RPC, YangStmtMapping.ACTION);
public EffectiveStatement<QName, ActionStatement> createEffective(
final StmtContext<QName, ActionStatement, EffectiveStatement<QName, ActionStatement>> ctx) {
SourceException.throwIf(StmtContextUtils.hasAncestorOfType(ctx, ILLEGAL_PARENTS),
- ctx.getStatementSourceReference(), "Action %s is defined within a notification, rpc or another action",
- ctx.getStatementArgument());
+ ctx.getStatementSourceReference(),
+ "Action %s is defined within a notification, rpc or another action", ctx.getStatementArgument());
SourceException.throwIf(!StmtContextUtils.hasAncestorOfTypeWithChildOfType(ctx, YangStmtMapping.LIST,
YangStmtMapping.KEY), ctx.getStatementSourceReference(),
"Action %s is defined within a list that has no key statement", ctx.getStatementArgument());