com.google.inject.spi
Class ModuleWriter

java.lang.Object
  extended by com.google.inject.spi.ModuleWriter

public class ModuleWriter
extends Object

Creates a Module from a collection of component elements.

Since:
2.0

Constructor Summary
ModuleWriter()
           
 
Method Summary
 void apply(Binder binder, Iterable<? extends Element> elements)
          Replays elements against binder.
protected  void applyScoping(Binding<?> binding, ScopedBindingBuilder scopedBindingBuilder)
           
protected
<T> ScopedBindingBuilder
applyTarget(Binding<T> binding, LinkedBindingBuilder<T> linkedBindingBuilder)
          Execute this target against the linked binding builder.
 Module create(Iterable<? extends Element> elements)
          Returns a module that executes the specified elements using this executing visitor.
protected
<T> void
writeBind(Binder binder, Binding<T> element)
           
protected  void writeBindInterceptor(Binder binder, InterceptorBinding element)
           
protected  void writeBindScope(Binder binder, ScopeBinding element)
           
protected  void writeConvertToTypes(Binder binder, TypeConverterBinding element)
           
protected
<T> void
writeGetProvider(Binder binder, ProviderLookup<T> element)
           
protected  void writeMessage(Binder binder, Message element)
           
protected  void writeRequestInjection(Binder binder, InjectionRequest command)
           
protected  void writeRequestStaticInjection(Binder binder, StaticInjectionRequest element)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModuleWriter

public ModuleWriter()
Method Detail

create

public final Module create(Iterable<? extends Element> elements)
Returns a module that executes the specified elements using this executing visitor.


apply

public final void apply(Binder binder,
                        Iterable<? extends Element> elements)
Replays elements against binder.


writeMessage

protected void writeMessage(Binder binder,
                            Message element)

writeBindInterceptor

protected void writeBindInterceptor(Binder binder,
                                    InterceptorBinding element)

writeBindScope

protected void writeBindScope(Binder binder,
                              ScopeBinding element)

writeRequestInjection

protected void writeRequestInjection(Binder binder,
                                     InjectionRequest command)

writeRequestStaticInjection

protected void writeRequestStaticInjection(Binder binder,
                                           StaticInjectionRequest element)

writeConvertToTypes

protected void writeConvertToTypes(Binder binder,
                                   TypeConverterBinding element)

writeBind

protected <T> void writeBind(Binder binder,
                             Binding<T> element)

applyTarget

protected <T> ScopedBindingBuilder applyTarget(Binding<T> binding,
                                               LinkedBindingBuilder<T> linkedBindingBuilder)
Execute this target against the linked binding builder.


applyScoping

protected void applyScoping(Binding<?> binding,
                            ScopedBindingBuilder scopedBindingBuilder)

writeGetProvider

protected <T> void writeGetProvider(Binder binder,
                                    ProviderLookup<T> element)


Copyright 2008 Google Inc. All Rights Reserved.