for (Iterator itr = objs.iterator(); itr.hasNext();) { obj = itr.next(); file = getSourceFile(obj); if (file == null) { if (_log != null && _log.isTraceEnabled())
/** * Returns a {@link Map} with keys of the {@link File} to be * written to, and values of a {@link Collection} of * {@link SourceTracker} instances. */ protected Map<File, Collection<Object>> getFileMap() { Collection<Object> objs = getObjects(); if (objs == null || objs.isEmpty()) return null; // create a map of files to lists of objects Map<File, Collection<Object>> files = new HashMap<File, Collection<Object>>(); File file; Collection<Object> fileObjs; for(Object obj : objs) { file = getSourceFile(obj); if (file == null) { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("no-file", obj)); continue; } fileObjs = (Collection<Object>) files.get(file); if (fileObjs == null) { fileObjs = new LinkedList<Object>(); files.put(file, fileObjs); } fileObjs.add(obj); } return files; }
/** * Returns a {@link Map} with keys of the {@link File} to be * written to, and values of a {@link Collection} of * {@link SourceTracker} instances. */ protected Map<File, Collection<Object>> getFileMap() { Collection<Object> objs = getObjects(); if (objs == null || objs.isEmpty()) return null; // create a map of files to lists of objects Map<File, Collection<Object>> files = new HashMap<File, Collection<Object>>(); File file; Collection<Object> fileObjs; for(Object obj : objs) { file = getSourceFile(obj); if (file == null) { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("no-file", obj)); continue; } fileObjs = (Collection<Object>) files.get(file); if (fileObjs == null) { fileObjs = new LinkedList<Object>(); files.put(file, fileObjs); } fileObjs.add(obj); } return files; }
/** * Returns a {@link Map} with keys of the {@link File} to be * written to, and values of a {@link Collection} of * {@link SourceTracker} instances. */ protected Map<File, Collection<Object>> getFileMap() { Collection<Object> objs = getObjects(); if (objs == null || objs.isEmpty()) return null; // create a map of files to lists of objects Map<File, Collection<Object>> files = new HashMap<File, Collection<Object>>(); File file; Collection<Object> fileObjs; for(Object obj : objs) { file = getSourceFile(obj); if (file == null) { if (_log != null && _log.isTraceEnabled()) _log.trace(_loc.get("no-file", obj)); continue; } fileObjs = (Collection<Object>) files.get(file); if (fileObjs == null) { fileObjs = new LinkedList<Object>(); files.put(file, fileObjs); } fileObjs.add(obj); } return files; }