| Modifier and Type | Method and Description |
|---|---|
protected void |
addParamTypes(MethodLiteral<?,?> method) |
Context |
getContext()
Returns the context in which this binding was created.
|
protected SourceSnippet |
getCreationStatement(NameGenerator nameGenerator,
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,
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. |
Collection<Dependency> |
getDependencies()
Returns the set of dependencies that this binding produces.
|
String |
getGetterMethodPackage()
Returns the package in which the getter for the bound key is created.
|
Collection<TypeLiteral<?>> |
getMemberInjectRequests()
Returns the set of types for which this binding requires member injection methods to be
written.
|
TypeLiteral<?> |
getType() |
protected String |
getTypeName() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetContext, getGetterMethodPackageprotected SourceSnippet getCreationStatement(NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException
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.
NoSourceNameExceptionpublic SourceSnippet getCreationStatements(NameGenerator nameGenerator, List<InjectorMethod> methodsOutput) throws NoSourceNameException
Bindingresult. If additional
methods are to be created, the given NameGenerator should be used
to choose their names, and they should be added to methodsOutput.getCreationStatements in interface BindingNoSourceNameException - if source name is not available for typepublic Collection<Dependency> getDependencies()
BindingDependency.GINJECTOR) as well as dependencies that
this binding needs.getDependencies in interface Bindingpublic TypeLiteral<?> getType()
protected String getTypeName() throws NoSourceNameException
NoSourceNameExceptionprotected void addParamTypes(MethodLiteral<?,?> method)
public Collection<TypeLiteral<?>> getMemberInjectRequests()
BindinggetMemberInjectRequests in interface Bindingpublic Context getContext()
BindinggetContext in interface Bindingpublic String getGetterMethodPackage()
BindingGinjectorBindings 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.
getGetterMethodPackage in interface BindingCopyright © 2008–2018. All rights reserved.