Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.google.gwt.inject.rebind.binding
Class CallConstructorBinding

    java.lang.Object
      com.google.gwt.inject.rebind.binding.CallConstructorBinding

All Implemented Interfaces:
  Binding

    public class CallConstructorBinding

extends java.lang.Object

A binding that calls a single constructor directly. Values for constructor parameters are retrieved by going back through the injector.

Method Summary
`protected void` | `addParamTypes(MethodLiteral<?,?> method)`
`Context` | `getContext()` Returns the context in which this binding was created.
`protected SourceSnippet` | `getCreationStatement(NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput)` Gets a `SourceSnippet` that creates the bound value and stores it in a new local variable named "result", and creates any auxiliary methods required by the snippet.
`SourceSnippet` | `getCreationStatements(NameGenerator nameGenerator, java.util.List<InjectorMethod> methodsOutput)` Gets one or more fully formed Java statements that create the bound value and store it in a new local variable named `result`.
`java.util.Collection<Dependency>` | `getDependencies()` Returns the set of dependencies that this binding produces.
`java.lang.String` | `getGetterMethodPackage()` Returns the package in which the getter for the bound key is created.
`java.util.Collection<TypeLiteral<?>>` | `getMemberInjectRequests()` Returns the set of types for which this binding requires member injection methods to be written.
`TypeLiteral<?>` | `getType()`
`protected java.lang.String` | `getTypeName()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface com.google.gwt.inject.rebind.binding.Binding
`getContext, getGetterMethodPackage`

Method Detail

### getCreationStatement

    protected SourceSnippet getCreationStatement(NameGenerator nameGenerator,
                                                 java.util.List<InjectorMethod> methodsOutput)
                                          throws NoSourceNameException

  Gets a `SourceSnippet` that creates the bound value and stores it in a new local variable named "result", and creates any auxiliary methods required by the snippet.

  The final creation statements output by this binding will also perform member injection on the created value.

  Throws:
    `NoSourceNameException`

### getCreationStatements

    public SourceSnippet getCreationStatements(NameGenerator nameGenerator,
                                               java.util.List<InjectorMethod> methodsOutput)
                                        throws NoSourceNameException

  Description copied from interface: `Binding`
  Gets one or more fully formed Java statements that create the bound value and store it in a new local variable named `result`. If additional methods are to be created, the given `NameGenerator` should be used to choose their names, and they should be added to `methodsOutput`.

  Specified by:
    `getCreationStatements` in interface `Binding`
  Throws:
    `NoSourceNameException` - if source name is not available for type

### getDependencies

    public java.util.Collection<Dependency> getDependencies()

  Description copied from interface: `Binding`
  Returns the set of dependencies that this binding produces. This contains edges coming into the key that this type binds (from `Dependency.GINJECTOR`) as well as dependencies that this binding needs.

  Specified by:
    `getDependencies` in interface `Binding`

### getType

    public TypeLiteral<?> getType()

### getTypeName

    protected java.lang.String getTypeName()
                                    throws NoSourceNameException

  Throws:
    `NoSourceNameException`

### addParamTypes

    protected void addParamTypes(MethodLiteral<?,?> method)

### getMemberInjectRequests

    public java.util.Collection<TypeLiteral<?>> getMemberInjectRequests()

  Description copied from interface: `Binding`
  Returns the set of types for which this binding requires member injection methods to be written.

  Specified by:
    `getMemberInjectRequests` in interface `Binding`

### getContext

    public Context getContext()

  Description copied from interface: `Binding`
  Returns the context in which this binding was created.

  Specified by:
    `getContext` in interface `Binding`

### getGetterMethodPackage

    public java.lang.String getGetterMethodPackage()

  Description copied from interface: `Binding`
  Returns the package in which the getter for the bound key is created. This is used by other bindings and by the top-level interface to determine which package this binding's method was written to. Implementors may assume that all other bindings have been created and placed in their respective `GinjectorBindings` objects.

  Typically this will be the package containing the type that is returned by the getter, but the only requirement is that it has to be a package where the return type is visible.

  Specified by:
    `getGetterMethodPackage` in interface `Binding`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD