Exemplo n.º 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;
 }
Exemplo n.º 2
0
 @Override
 public <T> T instantiateOnlyImplementer(Class<T> interfaceClass, Object... parameter) {
   return factory.instantiateOnlyImplementer(interfaceClass, parameter);
 }
Exemplo n.º 3
0
 @Override
 public <T> Collection<T> instantiateAllImplementers(
     Class<T> interfaceClass, Object... parameter) {
   return factory.instantiateAllImplementers(interfaceClass, parameter);
 }
Exemplo n.º 4
0
 @Override
 public <T> Collection<T> instantiateAll(
     Class<? extends Annotation> annotation, Object... parameter) throws InitializationException {
   return factory.instantiateAll(annotation, parameter);
 }