@Test void shouldHaveEmptyDependenciesAndAnnotations() { Resolution<FallbackClass> instantiation = provider.safeGet(FallbackClass.class); List<ObjectIdentifier> dependencies = instantiation.getDependencies(); assertThat(dependencies, empty()); }
@Override public List<ObjectIdentifier> getDependencies() { List<ObjectIdentifier> depList = dependencies == null ? null : dependencies.get(); if (depList == null) { List<ObjectIdentifier> constructorDeps = buildConstructorDependencies(); List<ObjectIdentifier> fieldDeps = buildFieldDependencies(); depList = new ArrayList<>(constructorDeps.size() + fieldDeps.size()); depList.addAll(constructorDeps); depList.addAll(fieldDeps); this.dependencies = new SoftReference<>(depList); } return depList; }
StandardInjection implements Resolution<T> { @Override public List<ObjectIdentifier> getDependencies() { List<ObjectIdentifier> depList = dependencies == null ? null : dependencies.get(); if (depList == null) { List<ObjectIdentifier> constructorDeps = buildConstructorDependencies(); List<ObjectIdentifier> fieldDeps = buildFieldDependencies(); depList = new ArrayList<>(constructorDeps.size() + fieldDeps.size()); depList.addAll(constructorDeps); depList.addAll(fieldDeps); this.dependencies = new SoftReference<>(depList); } return depList; } }
StandardInjection implements Resolution<T> { @Override public List<ObjectIdentifier> getDependencies() { List<ObjectIdentifier> depList = dependencies == null ? null : dependencies.get(); if (depList == null) { List<ObjectIdentifier> constructorDeps = buildConstructorDependencies(); List<ObjectIdentifier> fieldDeps = buildFieldDependencies(); depList = new ArrayList<>(constructorDeps.size() + fieldDeps.size()); depList.addAll(constructorDeps); depList.addAll(fieldDeps); this.dependencies = new SoftReference<>(depList); } return depList; } StandardInjection(Constructor<T> constructor, List<Field> fields); }
StandardInjection implements Resolution<T> { @Override public List<ObjectIdentifier> getDependencies() { List<ObjectIdentifier> depList = dependencies == null ? null : dependencies.get(); if (depList == null) { List<ObjectIdentifier> constructorDeps = buildConstructorDependencies(); List<ObjectIdentifier> fieldDeps = buildFieldDependencies(); depList = new ArrayList<>(constructorDeps.size() + fieldDeps.size()); depList.addAll(constructorDeps); depList.addAll(fieldDeps); this.dependencies = new SoftReference<>(depList); } return depList; } StandardInjection(Constructor<T> constructor, List<Field> fields); @Override List<ObjectIdentifier> getDependencies(); @Override T instantiateWith(Object... values); @Override boolean isInstantiation(); }
StandardInjection implements Resolution<T> { @Override public List<ObjectIdentifier> getDependencies() { List<ObjectIdentifier> depList = dependencies == null ? null : dependencies.get(); if (depList == null) { List<ObjectIdentifier> constructorDeps = buildConstructorDependencies(); List<ObjectIdentifier> fieldDeps = buildFieldDependencies(); depList = new ArrayList<>(constructorDeps.size() + fieldDeps.size()); depList.addAll(constructorDeps); depList.addAll(fieldDeps); this.dependencies = new SoftReference<>(depList); } return depList; } StandardInjection(Constructor<T> constructor, List<Field> fields); @Override List<ObjectIdentifier> getDependencies(); @Override T instantiateWith(Object... values); @Override boolean isInstantiation();  }