Thanks again for the pointers. I was able to make some progress by using...
When I tried using the .class of the original as suggest it was not finding
my replacement.
I found the other alternatives for bind that used TypeLiteral and Key and
tried those.
protected void configure() {
bind(Key.get(new TypeLiteral<Function<Image, OperatingSystem>>() {
})).to(MagnetImageToOperatingSystem.class).in(Singleton.class);
}
Now I am getting the errors below. Is there a way to force it to replace
the exiting binding?
com.google.inject.CreationException: Guice creation errors:
1) A binding to
com.google.common.base.Function<org.jclouds.openstack.nova.v2_0.domain.Image,
org.jclouds.compute.domain.OperatingSystem> was already configured at
com.magnet.tools.cloud.provision.jclouds.nova.CustomMagnetBindingsModule.configure(CustomMagnetBindingsModule.java:23)