public class InjectDataProviderFactory extends AbstractDataProviderFactory
DataProvider
s on the classpath. Dependencies between DataProviders are injected
.Modifier and Type | Class and Description |
---|---|
private static class |
InjectDataProviderFactory.Dependency |
private static class |
InjectDataProviderFactory.Injection |
Modifier and Type | Field and Description |
---|---|
private EntityImporter |
importer
The parent importer, set during
createDataProviders(EntityImporter) . |
private Map<InjectDataProviderFactory.Dependency,InjectDataProviderFactory.Injection> |
injections |
private org.reflections.Reflections |
reflections
Contains the class path scanner with the data provider packages.
|
Constructor and Description |
---|
InjectDataProviderFactory() |
buildReflections, findImporterDependency, findProviderClasses
private final Map<InjectDataProviderFactory.Dependency,InjectDataProviderFactory.Injection> injections
private EntityImporter importer
createDataProviders(EntityImporter)
.private org.reflections.Reflections reflections
private static Annotation findQualifier(AnnotatedElement annotatedElement)
private <C> InjectDataProviderFactory.Injection buildInjection(Class<C> instanceClass)
public void createDataProviders(EntityImporter parentImporter)
DataProviderFactory
DataProvider
s that are available for the current environment.
Ensures that the order of the providers is set in accordance with their dependencies.parentImporter
- the current importer that needs the providers, new providers are added with
EntityImporter.addDataProvider(DataProvider)
or
EntityImporter.addDataProvider(DataProvider, int)
private <C> InjectDataProviderFactory.Injection fillInjection(InjectDataProviderFactory.Injection injection, Constructor<C> constructor)
private Object[] fillParameters(Executable method, InjectDataProviderFactory.Injection injection)
private <C> Object findDependency(Member member, AnnotatedType annotatedType, InjectDataProviderFactory.Injection parentInjection)
private void injectFields(Class<?> instanceClass, Object instance, InjectDataProviderFactory.Injection parentInjection)
private void injectSetters(Class<?> instanceClass, Set<String> injectedMethods, Object instance, InjectDataProviderFactory.Injection parentInjection)
Copyright © 2022 fastnate.org. All rights reserved.