@Test void appendsTypeForEveryObjectClass() { JsCacheBuilder cacheBuilder = new JsCacheBuilder(); Map<String, Object> apis = new HashMap<>(); apis.put("api1", new ObjectWithFunction()); JsApiCache cache = cacheBuilder.buildFrom(apis); assertThat(cache.get("--classes").get(ObjectWithFunction.class.getName())).isInstanceOf(ClassEntry.class); }
public JsApiCache buildFrom(Map<String, Object> registeredApis) { JsApiCache.Builder builder = new JsApiCache.Builder(); for(String apiBaseName : registeredApis.keySet()) { appendObject(builder, apiBaseName, registeredApis.get(apiBaseName)); } return builder.build(); }
JsCacheBuilder { public JsApiCache buildFrom(Map<String, Object> registeredApis) { JsApiCache.Builder builder = new JsApiCache.Builder(); for(String apiBaseName : registeredApis.keySet()) { appendObject(builder, apiBaseName, registeredApis.get(apiBaseName)); } return builder.build(); } }
JsCacheBuilder { public JsApiCache buildFrom(Map<String, Object> registeredApis) { JsApiCache.Builder builder = new JsApiCache.Builder(); for(String apiBaseName : registeredApis.keySet()) { appendObject(builder, apiBaseName, registeredApis.get(apiBaseName)); } return builder.build(); }  }
JsCacheBuilder { public JsApiCache buildFrom(Map<String, Object> registeredApis) { JsApiCache.Builder builder = new JsApiCache.Builder(); for(String apiBaseName : registeredApis.keySet()) { appendObject(builder, apiBaseName, registeredApis.get(apiBaseName)); } return builder.build(); }  JsApiCache buildFrom(Map<String, Object> registeredApis); }
JsCacheBuilder { public JsApiCache buildFrom(Map<String, Object> registeredApis) { JsApiCache.Builder builder = new JsApiCache.Builder(); for(String apiBaseName : registeredApis.keySet()) { appendObject(builder, apiBaseName, registeredApis.get(apiBaseName)); } return builder.build(); }  JsApiCache buildFrom(Map<String, Object> registeredApis);  }