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