}
catch ( final NoSuchMethodException e )
{
}
bind( Bean.class ).annotatedWith( Names.named( "instance" ) ).toInstance( new BeanImpl() );
bind( Bean.class ).annotatedWith( Names.named( "deferred" ) ).toProvider( new LoadedClass<Bean>(
BeanImpl.class ) );
install( new PrivateModule()
{
@Override
protected void configure()
{
bind( Bean.class ).annotatedWith( Names.named( "exposed" ) ).to( BeanImpl.class );
expose( Bean.class ).annotatedWith( Names.named( "exposed" ) );
}
} );
bind( Bean.class ).annotatedWith( Names.named( "provider" ) ).toProvider( Providers.of( new BeanImpl() ) );
bind( Bean.class ).annotatedWith( Names.named( "broken" ) ).toProvider( new DeferredProvider<Bean>()
{
public Bean get()
{