@Override protected CARMARuntimeModule createRuntimeModule() { // make it work also with Maven/Tycho and OSGI // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=493672 return new CARMARuntimeModule() { @Override public ClassLoader bindClassLoaderToInstance() { return CARMAInjectorProvider.class .getClassLoader(); } @SuppressWarnings("restriction") @Override public void configure(Binder binder) { super.configure(binder); binder.bind(IGeneratorConfigProvider.class).to(MyGeneratorConfigProvider.class); } }; }
@Override public void configure(Binder binder) { binder.bind(IGeneratorConfigProvider.class).to(GeneratorConfigProvider.class); }
@Override public void configure(Binder binder) { binder.bind(IGeneratorConfigProvider.class).toInstance(new GeneratorConfigProvider()); }
/** * Fix for NPE in EclipseGeneratorConfigProvider. * * @return GeneratorConfigProvider */ @Override public Class<? extends IGeneratorConfigProvider> bindIGeneratorConfigProvider() { return GeneratorConfigProvider.class; }