@Test public void testRegister() { ConstraintsConverter c = new ConstraintsConverter(); c.register(new MockConstraintConverter()); Assert.assertTrue(c.getSupportedJavaConstraints().contains(MockSatConstraint.class)); Assert.assertTrue(c.getSupportedJSONConstraints().contains("mock")); }
public void register(ConstraintConverter<? extends Constraint> c) { java2json.put(c.getSupportedConstraint(), c); json2java.put(c.getJSONId(), c); }
ConstraintsConverter { public void register(ConstraintConverter<? extends Constraint> c) { java2json.put(c.getSupportedConstraint(), c); json2java.put(c.getJSONId(), c); } }
ConstraintsConverter { public void register(ConstraintConverter<? extends Constraint> c) { java2json.put(c.getSupportedConstraint(), c); json2java.put(c.getJSONId(), c); } ConstraintsConverter(); }
ConstraintsConverter { public void register(ConstraintConverter<? extends Constraint> c) { java2json.put(c.getSupportedConstraint(), c); json2java.put(c.getJSONId(), c); } ConstraintsConverter(); static ConstraintsConverter newBundle(); void register(ConstraintConverter<? extends Constraint> c); Set<Class<? extends Constraint>> getSupportedJavaConstraints(); Set<String> getSupportedJSONConstraints(); Constraint fromJSON(Model mo, JSONObject in); JSONObject toJSON(Constraint o); List<SatConstraint> listFromJSON(Model mo, JSONArray in); JSONArray toJSON(Collection<SatConstraint> e); }
ConstraintsConverter { public void register(ConstraintConverter<? extends Constraint> c) { java2json.put(c.getSupportedConstraint(), c); json2java.put(c.getJSONId(), c); } ConstraintsConverter(); static ConstraintsConverter newBundle(); void register(ConstraintConverter<? extends Constraint> c); Set<Class<? extends Constraint>> getSupportedJavaConstraints(); Set<String> getSupportedJSONConstraints(); Constraint fromJSON(Model mo, JSONObject in); JSONObject toJSON(Constraint o); List<SatConstraint> listFromJSON(Model mo, JSONArray in); JSONArray toJSON(Collection<SatConstraint> e);  }