コード例 #1
0
 public List<HeroModelInitializer> getInOrderFor(HeroModelGroup group) {
   ArrayList<HeroModelInitializer> initializerList = new ArrayList<>();
   Collection<HeroModelInitializer> collection =
       objectFactory.instantiateOrdered(RegisteredInitializer.class, applicationModel);
   for (HeroModelInitializer initializer : collection) {
     HeroModelGroup targetGroup =
         initializer.getClass().getAnnotation(RegisteredInitializer.class).value();
     if (targetGroup.equals(group)) {
       initializerList.add(initializer);
     }
   }
   return initializerList;
 }
コード例 #2
0
 @Override
 public <T> T instantiateOnlyImplementer(Class<T> interfaceClass, Object... parameter) {
   return factory.instantiateOnlyImplementer(interfaceClass, parameter);
 }
コード例 #3
0
 @Override
 public <T> Collection<T> instantiateAllImplementers(
     Class<T> interfaceClass, Object... parameter) {
   return factory.instantiateAllImplementers(interfaceClass, parameter);
 }
コード例 #4
0
 @Override
 public <T> Collection<T> instantiateAll(
     Class<? extends Annotation> annotation, Object... parameter) throws InitializationException {
   return factory.instantiateAll(annotation, parameter);
 }