@Test public void testFind() { File file = Paths.get("src" + File.separator + "main" + File.separator + "java" + File.separator + "io" + File.separator + "atlasmap" + File.separator + "core").toFile(); assertEquals(0, AtlasUtil.find(file, ".").size()); }
protected static List<Class<?>> find(File file, String scannedPackage) { List<Class<?>> classes = new ArrayList<Class<?>>(); String resource = scannedPackage + '.' + file.getName(); if (file.isDirectory()) { for (File child : file.listFiles()) { classes.addAll(find(child, resource)); } } else if (resource.endsWith(".class")) { int endIndex = resource.length() - ".class".length(); String className = resource.substring(0, endIndex); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException ignore) { } } return classes; }
AtlasUtil { protected static List<Class<?>> find(File file, String scannedPackage) { List<Class<?>> classes = new ArrayList<Class<?>>(); String resource = scannedPackage + '.' + file.getName(); if (file.isDirectory()) { for (File child : file.listFiles()) { classes.addAll(find(child, resource)); } } else if (resource.endsWith(".class")) { int endIndex = resource.length() - ".class".length(); String className = resource.substring(0, endIndex); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException ignore) { } } return classes; } }
AtlasUtil { protected static List<Class<?>> find(File file, String scannedPackage) { List<Class<?>> classes = new ArrayList<Class<?>>(); String resource = scannedPackage + '.' + file.getName(); if (file.isDirectory()) { for (File child : file.listFiles()) { classes.addAll(find(child, resource)); } } else if (resource.endsWith(".class")) { int endIndex = resource.length() - ".class".length(); String className = resource.substring(0, endIndex); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException ignore) { } } return classes; }  }
AtlasUtil { protected static List<Class<?>> find(File file, String scannedPackage) { List<Class<?>> classes = new ArrayList<Class<?>>(); String resource = scannedPackage + '.' + file.getName(); if (file.isDirectory()) { for (File child : file.listFiles()) { classes.addAll(find(child, resource)); } } else if (resource.endsWith(".class")) { int endIndex = resource.length() - ".class".length(); String className = resource.substring(0, endIndex); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException ignore) { } } return classes; }  static Properties loadPropertiesFromURL(URL url); static boolean isEmpty(String string); static boolean matchUriModule(String uriA, String uriB); static String getUriScheme(String atlasUri); static String getUriModule(String atlasUri); static String getUriDataType(String atlasUri); static String getUriModuleVersion(String atlasUri); static String getUriParameterValue(String atlasUri, String key); static Map<String, String> getUriParameters(String atlasUri); static int countCharacters(String text, char match); static List<Class<?>> findClassesForPackage(String scannedPackage); static void addAudit(AtlasSession session, String docId, String message, String path, AuditStatus status,
            String value); static Audit createAudit(AuditStatus status, String docId, String docName, String path, String value, String message); static void addAudit(AtlasSession session, Validation validation); static void addAudits(AtlasInternalSession session, String docId, List<Audit> audits); static AuditStatus toAuditStatus(ValidationStatus vstatus); static String getDocumentNameById(AtlasMapping mapping, String docId); static String getChainedMessage(Throwable t); static String escapeForUri(String source); static String unescapeFromUri(String uri); static void deleteDirectory(File targetDir); static void deleteDirectoryContents(File targetDir); static void copyFile(Path sourcePath, Path destPath); }
AtlasUtil { protected static List<Class<?>> find(File file, String scannedPackage) { List<Class<?>> classes = new ArrayList<Class<?>>(); String resource = scannedPackage + '.' + file.getName(); if (file.isDirectory()) { for (File child : file.listFiles()) { classes.addAll(find(child, resource)); } } else if (resource.endsWith(".class")) { int endIndex = resource.length() - ".class".length(); String className = resource.substring(0, endIndex); try { classes.add(Class.forName(className)); } catch (ClassNotFoundException ignore) { } } return classes; }  static Properties loadPropertiesFromURL(URL url); static boolean isEmpty(String string); static boolean matchUriModule(String uriA, String uriB); static String getUriScheme(String atlasUri); static String getUriModule(String atlasUri); static String getUriDataType(String atlasUri); static String getUriModuleVersion(String atlasUri); static String getUriParameterValue(String atlasUri, String key); static Map<String, String> getUriParameters(String atlasUri); static int countCharacters(String text, char match); static List<Class<?>> findClassesForPackage(String scannedPackage); static void addAudit(AtlasSession session, String docId, String message, String path, AuditStatus status,
            String value); static Audit createAudit(AuditStatus status, String docId, String docName, String path, String value, String message); static void addAudit(AtlasSession session, Validation validation); static void addAudits(AtlasInternalSession session, String docId, List<Audit> audits); static AuditStatus toAuditStatus(ValidationStatus vstatus); static String getDocumentNameById(AtlasMapping mapping, String docId); static String getChainedMessage(Throwable t); static String escapeForUri(String source); static String unescapeFromUri(String uri); static void deleteDirectory(File targetDir); static void deleteDirectoryContents(File targetDir); static void copyFile(Path sourcePath, Path destPath); static final int SPLIT_LIMIT; static final String NEW_LINE_CHARS; }