private static class InjectorImpl.ConvertedConstantBindingImpl<T> extends BindingImpl<T> implements ConvertedConstantBinding<T>
Modifier and Type | Field and Description |
---|---|
(package private) Binding<java.lang.String> |
originalBinding |
(package private) Provider<T> |
provider |
(package private) TypeConverterBinding |
typeConverterBinding |
(package private) T |
value |
Constructor and Description |
---|
ConvertedConstantBindingImpl(InjectorImpl injector,
Key<T> key,
T value,
Binding<java.lang.String> originalBinding,
TypeConverterBinding typeConverterBinding) |
Modifier and Type | Method and Description |
---|---|
<V> V |
acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Accepts a target visitor.
|
void |
applyTo(Binder binder)
Writes this module element to the given binder (optional operation).
|
boolean |
equals(java.lang.Object obj) |
java.util.Set<Dependency<?>> |
getDependencies()
Returns a singleton set containing only the converted key.
|
Provider<T> |
getProvider()
Returns the scoped provider guice uses to fulfill requests for this
binding.
|
Key<java.lang.String> |
getSourceKey()
Returns the key for the source binding.
|
TypeConverterBinding |
getTypeConverterBinding()
Returns the type converter binding used to convert the constant.
|
T |
getValue()
Returns the converted value.
|
int |
hashCode() |
java.lang.String |
toString() |
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getScoping, getSource, isConstant, withKey, withScoping
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
acceptScopingVisitor, getKey
acceptVisitor, getSource
final T value
final Binding<java.lang.String> originalBinding
final TypeConverterBinding typeConverterBinding
ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<java.lang.String> originalBinding, TypeConverterBinding typeConverterBinding)
public Provider<T> getProvider()
Binding
getProvider
in interface Binding<T>
getProvider
in class BindingImpl<T>
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Binding
acceptTargetVisitor
in interface Binding<T>
visitor
- to call back onpublic T getValue()
ConvertedConstantBinding
getValue
in interface ConvertedConstantBinding<T>
public TypeConverterBinding getTypeConverterBinding()
ConvertedConstantBinding
getTypeConverterBinding
in interface ConvertedConstantBinding<T>
public Key<java.lang.String> getSourceKey()
ConvertedConstantBinding
Injector.getBinding(key)
.getSourceKey
in interface ConvertedConstantBinding<T>
public java.util.Set<Dependency<?>> getDependencies()
ConvertedConstantBinding
getDependencies
in interface ConvertedConstantBinding<T>
getDependencies
in interface HasDependencies
public void applyTo(Binder binder)
Element
public java.lang.String toString()
toString
in class BindingImpl<T>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object