@Test(expected = InternalException.class) public void BeanFactoryが設定されていない場合はafterPrpertiesSetを実行できない() throws Exception { factory.afterPropertiesSet(); }
@Override public void afterPropertiesSet() throws Exception { if (factory == null) throw new InternalException(ProfillFactoryBean.class, "E-PROFILL#0005"); profill = createDefault(); if (!Arrays.isEmpty(providerRefs)) { for (String ref : providerRefs) { FillingProvider provider = factory.getBean(ref, FillingProvider.class); profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providerTypes)) { for (String type : providerTypes) { Class<?> clazz = Classes.forName(type); FillingProvider provider = (FillingProvider) Reflects.make(clazz); if (factory instanceof AutowireCapableBeanFactory) { ((AutowireCapableBeanFactory) factory).autowireBeanProperties( provider, getAutoWireType(), true); } profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providers)) { for (FillingProvider provider : providers) { profill.addFillingProvider(provider); } } }
ProfillFactoryBean implements FactoryBean<Profill>, BeanFactoryAware, InitializingBean { @Override public void afterPropertiesSet() throws Exception { if (factory == null) throw new InternalException(ProfillFactoryBean.class, "E-PROFILL#0005"); profill = createDefault(); if (!Arrays.isEmpty(providerRefs)) { for (String ref : providerRefs) { FillingProvider provider = factory.getBean(ref, FillingProvider.class); profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providerTypes)) { for (String type : providerTypes) { Class<?> clazz = Classes.forName(type); FillingProvider provider = (FillingProvider) Reflects.make(clazz); if (factory instanceof AutowireCapableBeanFactory) { ((AutowireCapableBeanFactory) factory).autowireBeanProperties( provider, getAutoWireType(), true); } profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providers)) { for (FillingProvider provider : providers) { profill.addFillingProvider(provider); } } } }
ProfillFactoryBean implements FactoryBean<Profill>, BeanFactoryAware, InitializingBean { @Override public void afterPropertiesSet() throws Exception { if (factory == null) throw new InternalException(ProfillFactoryBean.class, "E-PROFILL#0005"); profill = createDefault(); if (!Arrays.isEmpty(providerRefs)) { for (String ref : providerRefs) { FillingProvider provider = factory.getBean(ref, FillingProvider.class); profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providerTypes)) { for (String type : providerTypes) { Class<?> clazz = Classes.forName(type); FillingProvider provider = (FillingProvider) Reflects.make(clazz); if (factory instanceof AutowireCapableBeanFactory) { ((AutowireCapableBeanFactory) factory).autowireBeanProperties( provider, getAutoWireType(), true); } profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providers)) { for (FillingProvider provider : providers) { profill.addFillingProvider(provider); } } } ProfillFactoryBean(); }
ProfillFactoryBean implements FactoryBean<Profill>, BeanFactoryAware, InitializingBean { @Override public void afterPropertiesSet() throws Exception { if (factory == null) throw new InternalException(ProfillFactoryBean.class, "E-PROFILL#0005"); profill = createDefault(); if (!Arrays.isEmpty(providerRefs)) { for (String ref : providerRefs) { FillingProvider provider = factory.getBean(ref, FillingProvider.class); profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providerTypes)) { for (String type : providerTypes) { Class<?> clazz = Classes.forName(type); FillingProvider provider = (FillingProvider) Reflects.make(clazz); if (factory instanceof AutowireCapableBeanFactory) { ((AutowireCapableBeanFactory) factory).autowireBeanProperties( provider, getAutoWireType(), true); } profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providers)) { for (FillingProvider provider : providers) { profill.addFillingProvider(provider); } } } ProfillFactoryBean(); @Override void afterPropertiesSet(); @Override void setBeanFactory(BeanFactory beanFactory); @Override Profill getObject(); @Override Class<?> getObjectType(); @Override boolean isSingleton(); String[] getProviderRefs(); void setProviderRefs(String[] providerRefs); String[] getProviderTypes(); void setProviderTypes(String[] providerTypes); int getAutoWireType(); void setAutoWireType(int autoWireType); FillingProvider[] getProviders(); void setProviders(FillingProvider[] providers); }
ProfillFactoryBean implements FactoryBean<Profill>, BeanFactoryAware, InitializingBean { @Override public void afterPropertiesSet() throws Exception { if (factory == null) throw new InternalException(ProfillFactoryBean.class, "E-PROFILL#0005"); profill = createDefault(); if (!Arrays.isEmpty(providerRefs)) { for (String ref : providerRefs) { FillingProvider provider = factory.getBean(ref, FillingProvider.class); profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providerTypes)) { for (String type : providerTypes) { Class<?> clazz = Classes.forName(type); FillingProvider provider = (FillingProvider) Reflects.make(clazz); if (factory instanceof AutowireCapableBeanFactory) { ((AutowireCapableBeanFactory) factory).autowireBeanProperties( provider, getAutoWireType(), true); } profill.addFillingProvider(provider); } } if (!Arrays.isEmpty(providers)) { for (FillingProvider provider : providers) { profill.addFillingProvider(provider); } } } ProfillFactoryBean(); @Override void afterPropertiesSet(); @Override void setBeanFactory(BeanFactory beanFactory); @Override Profill getObject(); @Override Class<?> getObjectType(); @Override boolean isSingleton(); String[] getProviderRefs(); void setProviderRefs(String[] providerRefs); String[] getProviderTypes(); void setProviderTypes(String[] providerTypes); int getAutoWireType(); void setAutoWireType(int autoWireType); FillingProvider[] getProviders(); void setProviders(FillingProvider[] providers);  }