@Override public void cleanup(PersistenceUnitMetadata pu) { HibernateAnnotationScanner.cleanup(pu); } }
@Override public String getUnqualifiedJarName(URL jarUrl) { VirtualFile file = getFile(jarUrl); return file.getName(); }
resultClasses = getClassesInJar(jarToScan, annotationsToLookFor); } else { if (pu.getAnnotationIndex() != null) { Index index = getJarFileIndex(jarToScan, pu); if (index == null) { JPA_LOGGER.tracef("No classes to scan for annotations in jar '%s' (jars with classes '%s')", cachePackages(pu, jarToScan, packages); return new HashSet<Package>(packages); } else { return getCachedPackages(pu, jarToScan);
Index index = getJarFileIndex(jartoScan, pu); if (index == null) { JPA_LOGGER.tracef("No classes to scan for annotations in jar '%s' (jars with classes '%s')", cacheClasses(pu, jartoScan, annClass, classesForAnnotation); return getCachedClasses(pu, jartoScan, annotationsToLookFor);
private void findFiles(URL jartoScan, Set<String> filePatterns, Map<String, Set<NamedInputStream>> map, Set<NamedInputStream> result) { if (filePatterns.isEmpty()) { for (Set<NamedInputStream> nims : map.values()) result.addAll(nims); } else { VirtualFile root = null; for (String pattern : filePatterns) { Set<NamedInputStream> niss = map.get(pattern); if (niss == null) { if (root == null) root = getFile(jartoScan); try { List<VirtualFile> children = root.getChildrenRecursively(new HibernatePatternFilter(pattern)); niss = toNIS(children); } catch (IOException e) { throw new RuntimeException(e); } } if (niss != null) result.addAll(niss); } } }
@Override public Set<NamedInputStream> getFilesInJar(URL jartoScan, Set<String> filePatterns) { if (jartoScan == null) throw MESSAGES.nullVar("jartoScann"); if (filePatterns == null) throw MESSAGES.nullVar("filePatterns"); Set<NamedInputStream> result = new HashSet<NamedInputStream>(); Map<String, Set<NamedInputStream>> map; map = new HashMap<String, Set<NamedInputStream>>(); findFiles(jartoScan, filePatterns, map, result); return result; }
resultClasses = getClassesInJar(jarToScan, annotationsToLookFor); } else { if (pu.getAnnotationIndex() != null) { Index index = getJarFileIndex(jarToScan, pu); if (index == null) { JPA_LOGGER.tracef("No classes to scan for annotations in jar '%s' (jars with classes '%s')", cachePackages(pu, jarToScan, packages); return new HashSet<Package>(packages); } else { return getCachedPackages(pu, jarToScan);
Index index = getJarFileIndex(jartoScan, pu); if (index == null) { JPA_LOGGER.tracef("No classes to scan for annotations in jar '%s' (jars with classes '%s')", cacheClasses(pu, jartoScan, annClass, classesForAnnotation); return getCachedClasses(pu, jartoScan, annotationsToLookFor);
private void findFiles(URL jartoScan, Set<String> filePatterns, Map<String, Set<NamedInputStream>> map, Set<NamedInputStream> result) { if (filePatterns.isEmpty()) { for (Set<NamedInputStream> nims : map.values()) result.addAll(nims); } else { VirtualFile root = null; for (String pattern : filePatterns) { Set<NamedInputStream> niss = map.get(pattern); if (niss == null) { if (root == null) root = getFile(jartoScan); try { List<VirtualFile> children = root.getChildrenRecursively(new HibernatePatternFilter(pattern)); niss = toNIS(children); } catch (IOException e) { throw new RuntimeException(e); } } if (niss != null) result.addAll(niss); } } }
@Override public Set<NamedInputStream> getFilesInJar(URL jartoScan, Set<String> filePatterns) { if (jartoScan == null) throw MESSAGES.nullVar("jartoScann"); if (filePatterns == null) throw MESSAGES.nullVar("filePatterns"); Set<NamedInputStream> result = new HashSet<NamedInputStream>(); Map<String, Set<NamedInputStream>> map; map = new HashMap<String, Set<NamedInputStream>>(); findFiles(jartoScan, filePatterns, map, result); return result; }
@Override public String getUnqualifiedJarName(URL jarUrl) { VirtualFile file = getFile(jarUrl); return file.getName(); }
@Override public void cleanup(PersistenceUnitMetadata pu) { HibernateAnnotationScanner.cleanup(pu); } }