Top Description Methods
com.google.inject.spi

public Interface ConvertedConstantBinding<T>

extends Binding<T>, HasDependencies
Known Direct Implementers
com.google.inject.internal.InjectorImpl.ConvertedConstantBindingImpl
Imports
com.google.inject.Binding, .Key, java.util.Set

A binding created from converting a bound instance to a new type. The source binding has the same binding annotation but a different type.
Author
[email protected] (Jesse Wilson)
Since
2.0

Method Summary

Modifier and TypeMethod and Description
public Set<Dependency<?>>
getDependencies()

Redeclares com.google.inject.spi.HasDependencies.getDependencies.

Returns a singleton set containing only the converted key.
public Key<String>
getSourceKey()

Returns the key for the source binding.

public TypeConverterBinding
getTypeConverterBinding()

Returns the type converter binding used to convert the constant.

public T
getValue()

Returns the converted value.

Inherited from com.google.inject.Binding:
acceptScopingVisitoracceptTargetVisitorgetKeygetProvider

Method Detail

getDependenciesback to summary
public Set<Dependency<?>> getDependencies()

Redeclares com.google.inject.spi.HasDependencies.getDependencies.

Returns a singleton set containing only the converted key.

Returns:Set<Dependency<?>>

Doc from com.google.inject.spi.HasDependencies.getDependencies.

a possibly empty set

Annotations
@Override
getSourceKeyback to summary
public Key<String> getSourceKey()

Returns the key for the source binding. That binding can be retrieved from an injector using Injector.getBinding(key).

getTypeConverterBindingback to summary
public TypeConverterBinding getTypeConverterBinding()

Returns the type converter binding used to convert the constant.

Since
3.0
getValueback to summary
public T getValue()

Returns the converted value.