Rich Newman

SimpleMovieListerPrivateModule Class – Guice Java

package moviefindertest.guice;

import com.google.inject.PrivateModule;
import com.google.inject.Singleton;

public class SimpleMovieListerPrivateModule extends PrivateModule {

      @Override
      protected void configure() {
            bind(MovieFinder.class)
            .to(SimpleMovieFinder.class);
            
            bind(MovieLister.class)
            .annotatedWith(Simple.class)
            .to(MovieLister.class)
            .in(Singleton.class);
            
            expose(MovieLister.class).annotatedWith(Simple.class);
      }
}

Leave a Comment »

No comments yet.

RSS feed for comments on this post.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

The Shocking Blue Green Theme. Create a free website or blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.

Join 82 other followers

%d bloggers like this: