BUG-8043: eliminate ConstraintFactory
[yangtools.git] / yang / yang-parser-impl / src / main / java / org / opendaylight / yangtools / yang / parser / stmt / rfc6020 / effective / type / LengthEffectiveStatementImpl.java
index 19a71c04aeb3453b556f965bb1070eb2ec6191e2..4288fcc0a6bfac176710b9a4dfdc38b6908a9e86 100644 (file)
@@ -13,8 +13,15 @@ import org.opendaylight.yangtools.yang.model.api.type.LengthConstraint;
 import org.opendaylight.yangtools.yang.parser.spi.meta.StmtContext;
 
 public class LengthEffectiveStatementImpl extends
-        AbstractConstraintEffectiveStatement<List<LengthConstraint>, LengthStatement> {
+        AbstractListConstraintEffectiveStatement<LengthConstraint, LengthStatement> {
+
     public LengthEffectiveStatementImpl(final StmtContext<List<LengthConstraint>, LengthStatement, ?> ctx) {
-        super(ctx, new LengthConstraintFactory());
+        super(ctx);
+    }
+
+    @Override
+    final LengthConstraint createCustomizedConstraint(final LengthConstraint lengthConstraint) {
+        return new LengthConstraintEffectiveImpl(lengthConstraint.getMin(), lengthConstraint.getMax(),
+                getDescription(), getReference(), getErrorAppTag(), getErrorMessage());
     }
 }
\ No newline at end of file