/** merges saved Reflections resources from the given file, using the serializer configured in this instance's Configuration * <p> useful if you know the serialized resource location and prefer not to look it up the classpath * */ public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from file " + file, e); } finally { Utils.close(inputStream); } }
/** collect saved Reflection xml resources and merge it into a Reflections instance * <p>by default, resources are collected from all urls that contains the package META-INF/reflections * and includes files matching the pattern .*-reflections.xml * */ public static Reflections collect() { return collect("META-INF/reflections/", new FilterBuilder().include(".*-reflections.xml")); }
/** merges saved Reflections resources from the given file, using the serializer configured in this instance's Configuration * <p> useful if you know the serialized resource location and prefer not to look it up the classpath * */ public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from file " + file, e); } finally { Utils.close(inputStream); } }
/** collect saved Reflection xml resources and merge it into a Reflections instance * <p>by default, resources are collected from all urls that contains the package META-INF/reflections * and includes files matching the pattern .*-reflections.xml * */ public static Reflections collect() { return collect("META-INF/reflections/", new FilterBuilder().include(".*-reflections.xml")); }
/** * Find all entity classes with Reflections. */ public CadmiumPersistenceProvider() { List<String> eClassNames = new ArrayList<String>(); Reflections reflections = null; if(this.reflections == null) { reflections = Reflections.collect(); } else { reflections = this.reflections; } Set<Class<?>> entities = reflections.getTypesAnnotatedWith(Entity.class); if(entities != null) { for(Class<?> entity : entities) { log.debug("Registering entity {}", entity.getName()); eClassNames.add(entity.getName()); } } entityClassNames = Collections.unmodifiableList(eClassNames); }
public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from file " + file , e); } finally { Utils.close(inputStream); } }
/** merges saved Reflections resources from the given file, using the serializer configured in this instance's Configuration * <p> useful if you know the serialized resource location and prefer not to look it up the classpath * */ public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from file " + file, e); } finally { Utils.close(inputStream); } }
/** collect saved Reflection xml resources and merge it into a Reflections instance * <p>by default, resources are collected from all urls that contains the package META-INF/reflections * and includes files matching the pattern .*-reflections.xml * */ public static Reflections collect() { return collect("META-INF/reflections/", new FilterBuilder().include(".*-reflections.xml")); }
/** merges saved Reflections resources from the given file, using the serializer configured in this instance's Configuration * <p> useful if you know the serialized resource location and prefer not to look it up the classpath * */ public Reflections collect(final File file) { FileInputStream inputStream = null; try { inputStream = new FileInputStream(file); return collect(inputStream); } catch (FileNotFoundException e) { throw new ReflectionsException("could not obtain input stream from file " + file, e); } finally { Utils.close(inputStream); } }
/** collect saved Reflection xml resources and merge it into a Reflections instance * <p>by default, resources are collected from all urls that contains the package META-INF/reflections * and includes files matching the pattern .*-reflections.xml * */ public static Reflections collect() { return collect("META-INF/reflections/", new FilterBuilder().include(".*-reflections.xml")); }
public static Reflections collect() { return collect("META-INF/reflections/" , new FilterBuilder().include(".*-reflections.xml")); }