@SuppressWarnings("unused") private Map<String, Map<String, Long>> getEntrySizes(Module module, String name) { Map<String, Map<String, Long>> result = HashMapFactory.make(); Map<String, Long> curFileResult = HashMapFactory.make(); for (ModuleEntry e : Iterator2Iterable.make(module.getEntries())) { if (e.isModuleFile()) { result.putAll(getEntrySizes(e.asModule(), e.getName())); } else { if (e instanceof JarFileEntry) { curFileResult.put(e.getName(), ((JarFileEntry) e).getSize()); } } } result.put(name, curFileResult); return result; }
@SuppressWarnings("unused") private Map<String, Map<String, Long>> getEntrySizes(Module module, String name) { Map<String, Map<String, Long>> result = HashMapFactory.make(); Map<String, Long> curFileResult = HashMapFactory.make(); for (ModuleEntry e : Iterator2Iterable.make(module.getEntries())) { if (e.isModuleFile()) { result.putAll(getEntrySizes(e.asModule(), e.getName())); } else { if (e instanceof JarFileEntry) { curFileResult.put(e.getName(), ((JarFileEntry) e).getSize()); } } } result.put(name, curFileResult); return result; }
/** * Return the Set of (ModuleEntry) source files found in a module. * * @param M the module * @return the Set of source files in the module */ @SuppressWarnings("unused") private Set<ModuleEntry> getSourceFiles(Module M) throws IOException { if (DEBUG_LEVEL > 0) { System.err.println("Get source files for " + M); } HashSet<ModuleEntry> result = HashSetFactory.make(); for (ModuleEntry entry : Iterator2Iterable.make(M.getEntries())) { if (DEBUG_LEVEL > 0) { System.err.println("consider entry for source information: " + entry); } if (entry.isSourceFile()) { if (DEBUG_LEVEL > 0) { System.err.println("found source file: " + entry); } result.add(entry); } else if (entry.isModuleFile()) { result.addAll(getSourceFiles(entry.asModule())); } } return result; }
/** * Return the Set of (ModuleEntry) source files found in a module. * * @param M the module * @return the Set of source files in the module */ @SuppressWarnings("unused") private Set<ModuleEntry> getSourceFiles(Module M) throws IOException { if (DEBUG_LEVEL > 0) { System.err.println("Get source files for " + M); } HashSet<ModuleEntry> result = HashSetFactory.make(); for (ModuleEntry entry : Iterator2Iterable.make(M.getEntries())) { if (DEBUG_LEVEL > 0) { System.err.println("consider entry for source information: " + entry); } if (entry.isSourceFile()) { if (DEBUG_LEVEL > 0) { System.err.println("found source file: " + entry); } result.add(entry); } else if (entry.isModuleFile()) { result.addAll(getSourceFiles(entry.asModule())); } } return result; }
if (moduleEntry.isModuleFile()) { translateModuleToCAst(moduleEntry.asModule(), ast, topLevelEntities); } else { TranslatorToCAst xlatorToCAst = getTranslatorToCAst(ast, moduleEntry);
if (moduleEntry.isModuleFile()) { translateModuleToCAst(moduleEntry.asModule(), ast, topLevelEntities); } else { TranslatorToCAst xlatorToCAst = getTranslatorToCAst(ast, moduleEntry);
Set<ModuleEntry> s = getClassFiles(entry.asModule()); removeClassFiles(s, result); result.addAll(s);
Set<ModuleEntry> s = getClassFiles(entry.asModule()); removeClassFiles(s, result); result.addAll(s);