/** @return the injector */ public static void initProcessor(final ResourcePreProcessor processor) { final BaseWroManagerFactory factory = new BaseWroManagerFactory(); factory.setProcessorsFactory(new SimpleProcessorsFactory().addPreProcessor(processor)); final Injector injector = InjectorBuilder.create(factory).build(); injector.inject(processor); }
/** @return a default {@link Injector} to be used by test classes. */ public static Injector createInjector() { return InjectorBuilder.create(new BaseWroManagerFactory()).build(); }
public static void init(final WroModelFactory factory) { WroManagerFactory managerFactroy = new BaseWroManagerFactory().setModelFactory(factory); InjectorBuilder.create(managerFactroy).build().inject(factory); }