Package com.google.inject.internal
Class InjectorImpl.ConvertedConstantBindingImpl<T>
java.lang.Object
com.google.inject.internal.BindingImpl<T>
com.google.inject.internal.InjectorImpl.ConvertedConstantBindingImpl<T>
- All Implemented Interfaces:
Binding<T>
,ConvertedConstantBinding<T>
,Element
,HasDependencies
- Enclosing class:
InjectorImpl
private static class InjectorImpl.ConvertedConstantBindingImpl<T>
extends BindingImpl<T>
implements ConvertedConstantBinding<T>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final TypeConverterBinding
(package private) final T
-
Constructor Summary
ConstructorsConstructorDescriptionConvertedConstantBindingImpl
(InjectorImpl injector, Key<T> key, T value, Binding<String> originalBinding, TypeConverterBinding typeConverterBinding) -
Method Summary
Modifier and TypeMethodDescription<V> V
acceptTargetVisitor
(BindingTargetVisitor<? super T, V> visitor) Accepts a target visitor.void
Writes this module element to the given binder (optional operation).boolean
Set
<Dependency<?>> Returns a singleton set containing only the converted key.Returns the scoped provider guice uses to fulfill requests for this binding.Returns the key for the source binding.Returns the type converter binding used to convert the constant.getValue()
Returns the converted value.int
hashCode()
toString()
Methods inherited from class com.google.inject.internal.BindingImpl
acceptScopingVisitor, acceptVisitor, getInjector, getInternalFactory, getKey, getScoping, getSource, isConstant, withKey, withScoping
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.inject.Binding
acceptScopingVisitor, getKey
Methods inherited from interface com.google.inject.spi.Element
acceptVisitor, getSource
-
Field Details
-
value
-
provider
-
originalBinding
-
typeConverterBinding
-
-
Constructor Details
-
ConvertedConstantBindingImpl
ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<String> originalBinding, TypeConverterBinding typeConverterBinding)
-
-
Method Details
-
getProvider
Description copied from interface:Binding
Returns the scoped provider guice uses to fulfill requests for this binding.- Specified by:
getProvider
in interfaceBinding<T>
- Overrides:
getProvider
in classBindingImpl<T>
-
acceptTargetVisitor
Description copied from interface:Binding
Accepts a target visitor. Invokes the visitor method specific to this binding's target.- Specified by:
acceptTargetVisitor
in interfaceBinding<T>
- Parameters:
visitor
- to call back on
-
getValue
Description copied from interface:ConvertedConstantBinding
Returns the converted value.- Specified by:
getValue
in interfaceConvertedConstantBinding<T>
-
getTypeConverterBinding
Description copied from interface:ConvertedConstantBinding
Returns the type converter binding used to convert the constant.- Specified by:
getTypeConverterBinding
in interfaceConvertedConstantBinding<T>
-
getSourceKey
Description copied from interface:ConvertedConstantBinding
Returns the key for the source binding. That binding can be retrieved from an injector usingInjector.getBinding(key)
.- Specified by:
getSourceKey
in interfaceConvertedConstantBinding<T>
-
getDependencies
Description copied from interface:ConvertedConstantBinding
Returns a singleton set containing only the converted key.- Specified by:
getDependencies
in interfaceConvertedConstantBinding<T>
- Specified by:
getDependencies
in interfaceHasDependencies
- Returns:
- a possibly empty set
-
applyTo
Description copied from interface:Element
Writes this module element to the given binder (optional operation). -
toString
- Overrides:
toString
in classBindingImpl<T>
-
equals
-
hashCode
public int hashCode()
-