LimeWire Consolidated API

org.limewire.inject
Class AbstractModule

java.lang.Object
  extended by com.google.inject.AbstractModule
      extended by org.limewire.inject.AbstractModule
All Implemented Interfaces:
com.google.inject.Module
Direct Known Subclasses:
CoreGlueLibraryModule, CoreGlueXMPPModule, LimeWireCoreModule, LimewireGeocodeModule, LimeWireHttpAuthModule, LimeWireHttpModule, LimeWirePromotionModule, LimeWireSecurityCertificateModule

public abstract class AbstractModule
extends com.google.inject.AbstractModule

An extension for (@link com.google.inject.AbstractModule} that adds extra utility methods.


Constructor Summary
AbstractModule()
           
 
Method Summary
protected
<T> void
bindAll(Annotation annotation, Class<T> submostClass, Class<? extends com.google.inject.Provider<? extends T>> providerClass, Class<? super T>... otherClasses)
          Allows the caller to easily bind multiple interfaces to a single provider.
protected
<T> void
bindAll(Annotation annotation, Class<T> submostClass, Class<? extends com.google.inject.Provider<? extends T>> providerClass, Class<? super T> other1)
          A utility method for calling bindAll with one parameter without seeing a compile warning.
protected
<T> void
bindAll(Annotation annotation, Class<T> submostClass, Class<? extends com.google.inject.Provider<? extends T>> providerClass, Class<? super T> other1, Class<? super T> other2)
          A utility method for calling bindAll with two parameters without seeing a compile warning.
protected
<T> void
bindAll(Annotation annotation, Class<T> submostClass, Class<? extends com.google.inject.Provider<? extends T>> providerClass, Class<? super T> other1, Class<? super T> other2, Class<? super T> other3)
          A utility method for calling bindAll with three parameters without seeing a compile warning.
 
Methods inherited from class com.google.inject.AbstractModule
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindScope, configure, configure, convertToTypes, currentStage, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractModule

public AbstractModule()
Method Detail

bindAll

protected <T> void bindAll(Annotation annotation,
                           Class<T> submostClass,
                           Class<? extends com.google.inject.Provider<? extends T>> providerClass,
                           Class<? super T>... otherClasses)
Allows the caller to easily bind multiple interfaces to a single provider. Example use:
     bindAll(Names.named("backgroundExecutor"), ScheduledExecutorService.class, ScheduledExecutorServiceImpl.class, ExecutorService.class, Executor.class);
 

Parameters:
annotation - A shared annotation that defines the traits of the binding.
submostClass - The class the provider provides.
providerClass - The class of the provider.
otherClasses - Other classes the provider can provide.

bindAll

protected <T> void bindAll(Annotation annotation,
                           Class<T> submostClass,
                           Class<? extends com.google.inject.Provider<? extends T>> providerClass,
                           Class<? super T> other1)
A utility method for calling bindAll with one parameter without seeing a compile warning.


bindAll

protected <T> void bindAll(Annotation annotation,
                           Class<T> submostClass,
                           Class<? extends com.google.inject.Provider<? extends T>> providerClass,
                           Class<? super T> other1,
                           Class<? super T> other2)
A utility method for calling bindAll with two parameters without seeing a compile warning.


bindAll

protected <T> void bindAll(Annotation annotation,
                           Class<T> submostClass,
                           Class<? extends com.google.inject.Provider<? extends T>> providerClass,
                           Class<? super T> other1,
                           Class<? super T> other2,
                           Class<? super T> other3)
A utility method for calling bindAll with three parameters without seeing a compile warning.


LimeWire Consolidated API

Copyright © 2009. All Rights Reserved.