private static final PositionStatementSupport INSTANCE = new PositionStatementSupport();
private PositionStatementSupport() {
- super(YangStmtMapping.POSITION);
+ super(YangStmtMapping.POSITION, StatementPolicy.contextIndependent());
}
public static PositionStatementSupport getInstance() {
try {
return Uint32.valueOf(value).intern();
} catch (IllegalArgumentException e) {
- throw new SourceException(String.format("Bit position value %s is not valid integer", value),
- ctx.getStatementSourceReference(), e);
+ throw new SourceException(ctx, e, "Bit position value %s is not valid integer", value);
}
}
}
@Override
- protected PositionEffectiveStatement createEmptyEffective(final PositionStatement declared) {
- return new EmptyPositionEffectiveStatement(declared);
+ protected PositionEffectiveStatement createEffective(final PositionStatement declared,
+ final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
+ return new RegularPositionEffectiveStatement(declared, substatements);
}
@Override
- protected PositionEffectiveStatement createEffective(
- final StmtContext<Uint32, PositionStatement, PositionEffectiveStatement> ctx,
- final PositionStatement declared, final ImmutableList<? extends EffectiveStatement<?, ?>> substatements) {
- return new RegularPositionEffectiveStatement(declared, substatements);
+ protected PositionEffectiveStatement createEmptyEffective(final PositionStatement declared) {
+ return new EmptyPositionEffectiveStatement(declared);
}
}
\ No newline at end of file