@Test public void non_existent_simple_map_in_payload_is_ignored() { Slime slime = new Slime(); Cursor map = slime.setObject().setObject("non_existent_map"); map.setString("key","val"); MaptypesConfig config = new ConfigPayload(slime).toInstance(MaptypesConfig.class, ""); assertNotNull(config); }
public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) { return ConfigInstanceUtil.getNewInstance(clazz, configId, this); }
ConfigPayload { public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) { return ConfigInstanceUtil.getNewInstance(clazz, configId, this); } }
ConfigPayload { public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) { return ConfigInstanceUtil.getNewInstance(clazz, configId, this); } ConfigPayload(Slime slime); }
ConfigPayload { public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) { return ConfigInstanceUtil.getNewInstance(clazz, configId, this); } ConfigPayload(Slime slime); static ConfigPayload fromInstance(ConfigInstance instance); static ConfigPayload fromBuilder(ConfigPayloadBuilder builder); Slime getSlime(); void serialize(OutputStream os, SlimeFormat format); @Override String toString(); String toString(boolean compact); ConfigPayload applyDefaultsFromDef(InnerCNode clientDef); static ConfigPayload empty(); static ConfigPayload fromString(String jsonString); boolean isEmpty(); Utf8Array toUtf8Array(boolean compact); static ConfigPayload fromUtf8Array(Utf8Array payload); ConfigType toInstance(Class<ConfigType> clazz, String configId); }
ConfigPayload { public <ConfigType extends ConfigInstance> ConfigType toInstance(Class<ConfigType> clazz, String configId) { return ConfigInstanceUtil.getNewInstance(clazz, configId, this); } ConfigPayload(Slime slime); static ConfigPayload fromInstance(ConfigInstance instance); static ConfigPayload fromBuilder(ConfigPayloadBuilder builder); Slime getSlime(); void serialize(OutputStream os, SlimeFormat format); @Override String toString(); String toString(boolean compact); ConfigPayload applyDefaultsFromDef(InnerCNode clientDef); static ConfigPayload empty(); static ConfigPayload fromString(String jsonString); boolean isEmpty(); Utf8Array toUtf8Array(boolean compact); static ConfigPayload fromUtf8Array(Utf8Array payload); ConfigType toInstance(Class<ConfigType> clazz, String configId);  }