@Override
protected void declare() {
construct( Foo.class );
injectingInto( Foo.class ).bind( Bar.class ).to( BAR_IN_FOO );
bind( Bar.class ).to( BAR_EVERYWHERE_ELSE );
Name special = named( "special" );
construct( special, Foo.class ); // if we would use a type bind like to(Foo.class) it wouldn't work since we use a Foo that is not created as special Foo so it got the other Bar
injectingInto( special, Foo.class ).bind( Bar.class ).to( BAR_EVERYWHERE_ELSE );
Name awesome = named( "awesome" );
construct( awesome, Foo.class );
injectingInto( awesome, Foo.class ).bind( Bar.class ).to( BAR_IN_AWESOME_FOO );
construct( Baz.class );
TargetedBinder binder = injectingInto( Serializable.class );
binder.bind( Bar.class ).to( BAR_IN_SERIALIZABLE );