@Test public void testImmutableBean() { AbstractConfiguration override = new BaseConfiguration(); override.setProperty("models.0", "class=TestBean1, x=1, name=testProperty"); override.setProperty("model.1", "class=TestBean2, testField=${class=TestType}"); override.setProperty("models.2", "class=ImmutableTestBean, a=1, b=2, bean2=${model.1}, bean1=${models.0}"); new LocallyConfiguredThread() { @Override public void run() { ImmutableTestBean configuredBean = classInjector.injectConstructor(new ConfKey("models.2")); assertEquals(1, configuredBean.getA()); assertEquals(2, configuredBean.getB()); assertEquals(1, configuredBean.getBean1().getX()); assertEquals("testProperty", configuredBean.getBean1().getName()); } }.withOverriddenConfiguration(override).execute(); }
public <T> T injectConstructor(ConfigurationKey key) { return injectConstructor(new ConfigurationProperties(key)); }
ClassInjector { public <T> T injectConstructor(ConfigurationKey key) { return injectConstructor(new ConfigurationProperties(key)); } }
ClassInjector { public <T> T injectConstructor(ConfigurationKey key) { return injectConstructor(new ConfigurationProperties(key)); } ClassInjector();  ClassInjector(ClassResolver resolver); }
ClassInjector { public <T> T injectConstructor(ConfigurationKey key) { return injectConstructor(new ConfigurationProperties(key)); } ClassInjector();  ClassInjector(ClassResolver resolver); Sequence<T> injectMultipleConstructors(ConfigurationKey key); T injectConstructor(ConfigurationKey key); T injectConstructor(ConfigurationProperties properties); }
ClassInjector { public <T> T injectConstructor(ConfigurationKey key) { return injectConstructor(new ConfigurationProperties(key)); } ClassInjector();  ClassInjector(ClassResolver resolver); Sequence<T> injectMultipleConstructors(ConfigurationKey key); T injectConstructor(ConfigurationKey key); T injectConstructor(ConfigurationProperties properties);  }