@Test public void testConstructChecklists() throws Exception { List<Checklist> constructed = constructIndivChecklists(); assertEquals("constructed size is", 4, constructed.size()); assertTrue("constructed has alpha/alpha checklist", constructed.stream().anyMatch(alphaFilter)); assertTrue("constructed has bravo/bravo-1 checklist", constructed.stream().anyMatch(bravo1Filter)); assertTrue("constructed has bravo/bravo-2 checklist", constructed.stream().anyMatch(bravo2Filter)); assertTrue("constructed has charlie/charlie checklist", constructed.stream().anyMatch(charlieFilter)); }
public static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed) throws Exception { List<Checklist> checklists = new ArrayList<>(); for (Map.Entry<URL, List<JsonObject>> entry : parsed.entrySet()) { final URL manifestUrl = entry.getKey(); final String moduleName = bestModuleName(manifestUrl); entry.getValue().forEach(json -> checklists.add(Checklist.fromJson(moduleName, manifestUrl, json))); } return checklists; }
ChecklistPlanner { public static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed) throws Exception { List<Checklist> checklists = new ArrayList<>(); for (Map.Entry<URL, List<JsonObject>> entry : parsed.entrySet()) { final URL manifestUrl = entry.getKey(); final String moduleName = bestModuleName(manifestUrl); entry.getValue().forEach(json -> checklists.add(Checklist.fromJson(moduleName, manifestUrl, json))); } return checklists; } }
ChecklistPlanner { public static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed) throws Exception { List<Checklist> checklists = new ArrayList<>(); for (Map.Entry<URL, List<JsonObject>> entry : parsed.entrySet()) { final URL manifestUrl = entry.getKey(); final String moduleName = bestModuleName(manifestUrl); entry.getValue().forEach(json -> checklists.add(Checklist.fromJson(moduleName, manifestUrl, json))); } return checklists; } ChecklistPlanner(final List<String> activeChecklistIds); }
ChecklistPlanner { public static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed) throws Exception { List<Checklist> checklists = new ArrayList<>(); for (Map.Entry<URL, List<JsonObject>> entry : parsed.entrySet()) { final URL manifestUrl = entry.getKey(); final String moduleName = bestModuleName(manifestUrl); entry.getValue().forEach(json -> checklists.add(Checklist.fromJson(moduleName, manifestUrl, json))); } return checklists; } ChecklistPlanner(final List<String> activeChecklistIds); void provideChecklists(final List<Checklist> constructed); void discoverChecklists(); void discoverChecklists(final ClassLoader classLoader); void discoverChecklists(final List<File> files); List<InitStage> getInitStages(); List<CheckSpec> getEffectiveCheckSpecs(final List<CheckSpec> checkOverrides); static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed); static Map<URL, List<JsonObject>> parseChecklists(final URL manifestUrl); static Map<URL, List<JsonObject>> parseChecklists(final ClassLoader classLoader); static Map<URL, List<JsonObject>> parseChecklists(final List<File> files); }
ChecklistPlanner { public static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed) throws Exception { List<Checklist> checklists = new ArrayList<>(); for (Map.Entry<URL, List<JsonObject>> entry : parsed.entrySet()) { final URL manifestUrl = entry.getKey(); final String moduleName = bestModuleName(manifestUrl); entry.getValue().forEach(json -> checklists.add(Checklist.fromJson(moduleName, manifestUrl, json))); } return checklists; } ChecklistPlanner(final List<String> activeChecklistIds); void provideChecklists(final List<Checklist> constructed); void discoverChecklists(); void discoverChecklists(final ClassLoader classLoader); void discoverChecklists(final List<File> files); List<InitStage> getInitStages(); List<CheckSpec> getEffectiveCheckSpecs(final List<CheckSpec> checkOverrides); static List<Checklist> constructChecklists(final Map<URL, List<JsonObject>> parsed); static Map<URL, List<JsonObject>> parseChecklists(final URL manifestUrl); static Map<URL, List<JsonObject>> parseChecklists(final ClassLoader classLoader); static Map<URL, List<JsonObject>> parseChecklists(final List<File> files); static final String OAKPAL_CHECKLIST; static final String OAKPAL_MODULENAME; static final String BUNDLE_SYMBOLICNAME; static final String AUTOMATIC_MODULE_NAME; }