@Test public void testRegister() { ModelViewsConverter c = new ModelViewsConverter(); c.register(new MockModelViewConverter()); Assert.assertTrue(c.getSupportedJavaViews().contains(MockModelView.class)); Assert.assertTrue(c.getSupportedJSONViews().contains("mockView")); }
public void register(ModelViewConverter<? extends ModelView> c) { java2json.put(c.getSupportedView(), c); json2java.put(c.getJSONId(), c); }
ModelViewsConverter { public void register(ModelViewConverter<? extends ModelView> c) { java2json.put(c.getSupportedView(), c); json2java.put(c.getJSONId(), c); } }
ModelViewsConverter { public void register(ModelViewConverter<? extends ModelView> c) { java2json.put(c.getSupportedView(), c); json2java.put(c.getJSONId(), c); } ModelViewsConverter(); }
ModelViewsConverter { public void register(ModelViewConverter<? extends ModelView> c) { java2json.put(c.getSupportedView(), c); json2java.put(c.getJSONId(), c); } ModelViewsConverter(); static ModelViewsConverter newBundle(); void register(ModelViewConverter<? extends ModelView> c); Set<Class<? extends ModelView>> getSupportedJavaViews(); Set<String> getSupportedJSONViews(); ModelView fromJSON(Model mo, JSONObject in); JSONObject toJSON(ModelView o); }
ModelViewsConverter { public void register(ModelViewConverter<? extends ModelView> c) { java2json.put(c.getSupportedView(), c); json2java.put(c.getJSONId(), c); } ModelViewsConverter(); static ModelViewsConverter newBundle(); void register(ModelViewConverter<? extends ModelView> c); Set<Class<? extends ModelView>> getSupportedJavaViews(); Set<String> getSupportedJSONViews(); ModelView fromJSON(Model mo, JSONObject in); JSONObject toJSON(ModelView o);  }