Package org.fastnate.data
Class AbstractDataProviderFactory
java.lang.Object
org.fastnate.data.AbstractDataProviderFactory
- All Implemented Interfaces:
DataProviderFactory
- Direct Known Subclasses:
DefaultDataProviderFactory,InjectDataProviderFactory
Base classes for implementations of
DataProviderFactory.- Author:
- Tobias Liefke
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.reflections.ReflectionsbuildReflections(EntityImporter importer) Builds the reflections object for scanning for data providers.protected <E> EfindImporterDependency(EntityImporter importer, Class<E> dependencyClass) Models dependencies from the importer.protected List<Class<? extends DataProvider>> findProviderClasses(org.reflections.Reflections reflections) Finds all provider classes from the class path, that implementDataProvider.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.fastnate.data.DataProviderFactory
createDataProviders
-
Constructor Details
-
AbstractDataProviderFactory
public AbstractDataProviderFactory()
-
-
Method Details
-
buildReflections
Builds the reflections object for scanning for data providers.- Parameters:
importer- the importer that contains the settings- Returns:
- the class path scanner for the data provider packages
-
findImporterDependency
Models dependencies from the importer.- Parameters:
importer- the current importerdependencyClass- the class of the property to inject into a newDataProvider- Returns:
- the dependency or
nullif not found
-
findProviderClasses
protected List<Class<? extends DataProvider>> findProviderClasses(org.reflections.Reflections reflections) Finds all provider classes from the class path, that implementDataProvider.- Parameters:
reflections- contains all the packages, that should be scanned- Returns:
- all found classes
-