Wiring { public <T, R extends T> R newInstance(Class<T> type) { return newInstance(type, Collections.emptyList()); } Wiring(PropertySource propertySource, FactoryChain factoryChain, Scope defaultScope);  Wiring(PropertySource propertySource, FactoryChain factoryChain);  Wiring(FactoryChain factoryChain, Scope defaultScope);  Wiring(FactoryChain factoryChain);  Wiring(PropertySource propertySource, Scope defaultScope);  Wiring(PropertySource propertySource);  Wiring();  Wiring(Wiring wiring, FactoryChain factoryChain); private  Wiring(PropertySource propertySource, FactoryChain factoryChain, Scope defaultScope, Scope singletonScope); FactoryChain getFactoryChain(); Value getRequiredNamed(String property); Optional<Value> getNamed(String property); R defaultScoped(Class<? extends T> type); R defaultScoped(Class<? extends T> type, String... qualifiers); R defaultScoped(Class<? extends T> type, Collection<String> qualifiers); R newInstance(Class<T> type); R newInstance(Class<T> type, String... qualifiers); R newInstance(Class<T> type, Collection<String> qualifiers); R singleton(Class<T> type); R singleton(Class<T> type, String... qualifiers); R singleton(Class<T> type, Collection<String> qualifiers); R with(PropertySource propertySource, FactoryChain factoryChain, Func1<Wiring, R> wiringConsumer); R with(PropertySource propertySource, Func1<Wiring, R> wiringConsumer); R with(FactoryChain factoryChain, Func1<Wiring, R> wiringConsumer); R with(Func1<Wiring, R> wiringConsumer);  }
@Test public void autoConstruction() { ConcreteClass concreteClass = new ConcreteClass(); ConcreteClass3 concreteClass3 = new Wiring(FactoryChains.forType(ConcreteClass.class, (w, c) -> concreteClass) .thenForAnyConcreteClass()) .newInstance(ConcreteClass3.class); assertEquals(concreteClass, concreteClass3.concreteClass); assertEquals(concreteClass, concreteClass3.concreteClass2.concreteClass); }