@Override public String toString() { if (marker != null) return getAbsolutePath() + " [marker=" + marker + "]"; return getAbsolutePath(); } }
public Class<?> loadAsClass() throws ClassNotFoundException, IOException, ClassFormatError { if (clazz == null) { ClassLoader loader = scanner.getLoader(); if (loader instanceof ScannedItemClassLoader) clazz = ((ScannedItemClassLoader)loader).loadClass(this); else clazz = loader.loadClass(getClassName()); } return clazz; }
public void handleDirectory(File root, File path) { FileScannedItem markerItem = null; if (marker != null) { File markerFile = new File(root, marker); markerItem = new FileScannedItem(this, null, root, markerFile); for (ScannedItemHandler handler : handlers) { boolean skip = handler.handleMarkerItem(markerItem); if (skip) return; } } handleDirectory(markerItem, root, path); }
public void handleDirectory(FileScannedItem markerItem, File root, File path) { for (File child : path.listFiles()) { if (child.isDirectory()) handleDirectory(markerItem, root, child); else if (markerItem == null || !markerItem.getFile().equals(child)) { for (ScannedItemHandler handler : handlers) handler.handleScannedItem(new FileScannedItem(this, markerItem, root, child)); } } } }
private void scanConfig(String serviceConfigProperties, List<ScannedItemHandler> handlers) { Scanner scanner = ScannerFactory.createScanner(this, serviceConfigProperties != null ? serviceConfigProperties : SERVICES_CONFIG_PROPERTIES); scanner.addHandlers(handlers); try { scanner.scan(); } catch (Exception e) { log.error(e, "Could not scan classpath for configuration"); } }
private void scanConfig(String graniteConfigProperties) { //if config overriding exists Scanner scanner = ScannerFactory.createScanner(this, graniteConfigProperties != null ? graniteConfigProperties : GRANITE_CONFIG_PROPERTIES); try { scanner.scan(); } catch (Exception e) { log.error(e, "Could not scan classpath for configuration"); } }
public void handleDirectory(FileScannedItem markerItem, File root, File path) { for (File child : path.listFiles()) { if (child.isDirectory()) handleDirectory(markerItem, root, child); else if (markerItem == null || !markerItem.getFile().equals(child)) { for (ScannedItemHandler handler : handlers) handler.handleScannedItem(new FileScannedItem(this, markerItem, root, child)); } } } }
public Class<?> loadAsClass() throws ClassNotFoundException, IOException, ClassFormatError { if (clazz == null) { ClassLoader loader = scanner.getLoader(); if (loader instanceof ScannedItemClassLoader) clazz = ((ScannedItemClassLoader)loader).loadClass(this); else clazz = loader.loadClass(getClassName()); } return clazz; }
public void handleDirectory(File root, File path) { FileScannedItem markerItem = null; if (marker != null) { File markerFile = new File(root, marker); markerItem = new FileScannedItem(this, null, root, markerFile); for (ScannedItemHandler handler : handlers) { boolean skip = handler.handleMarkerItem(markerItem); if (skip) return; } } handleDirectory(markerItem, root, path); }
private void scanConfig(String serviceConfigProperties, List<ScannedItemHandler> handlers) { Scanner scanner = ScannerFactory.createScanner(this, serviceConfigProperties != null ? serviceConfigProperties : SERVICES_CONFIG_PROPERTIES); scanner.addHandlers(handlers); try { scanner.scan(); } catch (Exception e) { log.error(e, "Could not scan classpath for configuration"); } }
private void scanConfig(String graniteConfigProperties) { //if config overriding exists Scanner scanner = ScannerFactory.createScanner(this, graniteConfigProperties != null ? graniteConfigProperties : GRANITE_CONFIG_PROPERTIES); try { scanner.scan(); } catch (Exception e) { log.error(e, "Could not scan classpath for configuration"); } }
@Override public String toString() { if (marker != null) return getAbsolutePath() + " [marker=" + marker + "]"; return getAbsolutePath(); } }
public void handleDirectory(FileScannedItem markerItem, File root, File path) { for (File child : path.listFiles()) { if (child.isDirectory()) handleDirectory(markerItem, root, child); else if (markerItem == null || !markerItem.getFile().equals(child)) { for (ScannedItemHandler handler : handlers) handler.handleScannedItem(new FileScannedItem(this, markerItem, root, child)); } } } }
public Class<?> loadAsClass() throws ClassNotFoundException, IOException, ClassFormatError { if (clazz == null) { ClassLoader loader = scanner.getLoader(); if (loader instanceof ScannedItemClassLoader) clazz = ((ScannedItemClassLoader)loader).loadClass(this); else clazz = loader.loadClass(getClassName()); } return clazz; }
public void handleDirectory(File root, File path) { FileScannedItem markerItem = null; if (marker != null) { File markerFile = new File(root, marker); markerItem = new FileScannedItem(this, null, root, markerFile); for (ScannedItemHandler handler : handlers) { boolean skip = handler.handleMarkerItem(markerItem); if (skip) return; } } handleDirectory(markerItem, root, path); }
private void scanConfig(String graniteConfigProperties) { //if config overriding exists Scanner scanner = ScannerFactory.createScanner(this, graniteConfigProperties != null ? graniteConfigProperties : GRANITE_CONFIG_PROPERTIES); try { scanner.scan(); } catch (Exception e) { log.error(e, "Could not scan classpath for configuration"); } }
@Override public String toString() { if (marker != null) return getAbsolutePath() + " [marker=" + marker + "]"; return getAbsolutePath(); } }
public void handleDirectory(FileScannedItem markerItem, File root, File path) { for (File child : path.listFiles()) { if (child.isDirectory()) handleDirectory(markerItem, root, child); else if (markerItem == null || !markerItem.getFile().equals(child)) { for (ScannedItemHandler handler : handlers) handler.handleScannedItem(new FileScannedItem(this, markerItem, root, child)); } } } }
public Class<?> loadAsClass() throws ClassNotFoundException, IOException, ClassFormatError { if (clazz == null) { ClassLoader loader = scanner.getLoader(); if (loader instanceof ScannedItemClassLoader) clazz = ((ScannedItemClassLoader)loader).loadClass(this); else clazz = loader.loadClass(getClassName()); } return clazz; }
@Override public String toString() { if (marker != null) return getAbsolutePath() + " [marker=" + marker + "]"; return getAbsolutePath(); } }