com.google.gwt.inject.client
Class AbstractGinModule
java.lang.Object
com.google.gwt.inject.client.AbstractGinModule
- All Implemented Interfaces:
- GinModule
public abstract class AbstractGinModule
- extends java.lang.Object
- implements GinModule
A support class for GinModule
s which reduces repetition and results in
a more readable configuration. Simply extend this class, implement configure()
, and call the inherited methods which mirror those found in
GinBinder
. For example:
public class MyModule extends AbstractGinModule {
protected void configure() {
bind(Service.class).to(ServiceImpl.class).in(Singleton.class);
bind(CreditCardPaymentService.class);
bind(PaymentService.class).to(CreditCardPaymentService.class);
}
}
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractGinModule
public AbstractGinModule()
configure
public final void configure(GinBinder binder)
- Description copied from interface:
GinModule
- Contributes bindings and other configurations for this module to
binder
.
- Specified by:
configure
in interface GinModule
configure
protected abstract void configure()
bind
protected final <T> GinAnnotatedBindingBuilder<T> bind(java.lang.Class<T> clazz)
- See Also:
GinBinder.bind(Class)
bind
protected final <T> GinAnnotatedBindingBuilder<T> bind(TypeLiteral<T> type)
- See Also:
GinBinder.bind(TypeLiteral)
bind
protected final <T> GinLinkedBindingBuilder<T> bind(Key<T> key)
- See Also:
GinBinder.bind(Key)
bindConstant
protected final GinAnnotatedConstantBindingBuilder bindConstant()
- See Also:
GinBinder.bindConstant()
install
protected final void install(GinModule install)
- See Also:
GinBinder#install(Module)
requestStaticInjection
protected void requestStaticInjection(java.lang.Class<?>... types)
- See Also:
GinBinder.requestStaticInjection(Class[])
binder
protected GinBinder binder()
- Gets direct access to the underlying
GinBinder
.