/** * Override to not overwrite annotations. */ @Override protected File getSourceFile(Object obj) { File file = super.getSourceFile(obj); if (file == null || file.getName().endsWith(".java") || file.getName().endsWith(".class")) return null; return file; }
/** * Helper method to group objects by package. * * @return mapping of package name to a collection of objects in * that package */ protected Map groupByPackage(Collection objs) throws SAXException { Map packages = new LinkedHashMap(); String packageName; Collection packageObjs; Object obj; for (Iterator itr = objs.iterator(); itr.hasNext();) { obj = itr.next(); packageName = getPackage(obj); packageObjs = (Collection) packages.get(packageName); if (packageObjs == null) { packageObjs = new LinkedList(); packages.put(packageName, packageObjs); } packageObjs.add(obj); } return packages; }
/** * Helper method to group objects by package. * * @return mapping of package name to a collection of objects in that * package */ protected Map<String, Collection<Object>> groupByPackage( Collection<Object> objs) throws SAXException { Map<String, Collection<Object>> packages = new LinkedHashMap<String, Collection<Object>>(); String packageName; Collection<Object> packageObjs; Object obj; for (Iterator<Object> itr = objs.iterator(); itr.hasNext();) { obj = itr.next(); packageName = getPackage(obj); packageObjs = packages.get(packageName); if (packageObjs == null) { packageObjs = new LinkedList<Object>(); packages.put(packageName, packageObjs); } packageObjs.add(obj); } return packages; }
/** * Override to not overwrite annotations. */ @Override protected File getSourceFile(Object obj) { File file = super.getSourceFile(obj); if (file == null || file.getName().endsWith(".java") || file.getName().endsWith(".class")) return null; return file; }
/** * Helper method to group objects by package. * * @return mapping of package name to a collection of objects in that * package */ protected Map<String, Collection<Object>> groupByPackage( Collection<Object> objs) throws SAXException { Map<String, Collection<Object>> packages = new LinkedHashMap<String, Collection<Object>>(); String packageName; Collection<Object> packageObjs; Object obj; for (Iterator<Object> itr = objs.iterator(); itr.hasNext();) { obj = itr.next(); packageName = getPackage(obj); packageObjs = packages.get(packageName); if (packageObjs == null) { packageObjs = new LinkedList<Object>(); packages.put(packageName, packageObjs); } packageObjs.add(obj); } return packages; }
/** * Override to not overwrite annotations. */ @Override protected File getSourceFile(Object obj) { File file = super.getSourceFile(obj); if (file == null || file.getName().endsWith(".java") || file.getName().endsWith(".class")) return null; return file; }
/** * Helper method to group objects by package. * * @return mapping of package name to a collection of objects in that * package */ protected Map<String, Collection<Object>> groupByPackage( Collection<Object> objs) throws SAXException { Map<String, Collection<Object>> packages = new LinkedHashMap<String, Collection<Object>>(); String packageName; Collection<Object> packageObjs; Object obj; for (Iterator<Object> itr = objs.iterator(); itr.hasNext();) { obj = itr.next(); packageName = getPackage(obj); packageObjs = packages.get(packageName); if (packageObjs == null) { packageObjs = new LinkedList<Object>(); packages.put(packageName, packageObjs); } packageObjs.add(obj); } return packages; }
/** * Override to not overwrite annotations. */ @Override protected File getSourceFile(Object obj) { File file = super.getSourceFile(obj); if (file == null || file.getName().endsWith(".java") || file.getName().endsWith(".class")) return null; return file; }
/** * Override to not overwrite annotations. */ @Override protected File getSourceFile(Object obj) { File file = super.getSourceFile(obj); if (file == null || file.getName().endsWith(".java") || file.getName().endsWith(".class")) return null; return file; }