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
Fields Modifier and Type Field Description (package private) Binding<java.lang.String>originalBinding(package private) Provider<T>provider(package private) TypeConverterBindingtypeConverterBinding(package private) Tvalue
-
Constructor Summary
Constructors Constructor Description ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<java.lang.String> originalBinding, TypeConverterBinding typeConverterBinding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V> VacceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)Accepts a target visitor.voidapplyTo(Binder binder)Writes this module element to the given binder (optional operation).booleanequals(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.TypeConverterBindinggetTypeConverterBinding()Returns the type converter binding used to convert the constant.TgetValue()Returns the converted value.inthashCode()java.lang.StringtoString()-
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 Detail
-
value
final T value
-
originalBinding
final Binding<java.lang.String> originalBinding
-
typeConverterBinding
final TypeConverterBinding typeConverterBinding
-
-
Constructor Detail
-
ConvertedConstantBindingImpl
ConvertedConstantBindingImpl(InjectorImpl injector, Key<T> key, T value, Binding<java.lang.String> originalBinding, TypeConverterBinding typeConverterBinding)
-
-
Method Detail
-
getProvider
public Provider<T> getProvider()
Description copied from interface:BindingReturns the scoped provider guice uses to fulfill requests for this binding.- Specified by:
getProviderin interfaceBinding<T>- Overrides:
getProviderin classBindingImpl<T>
-
acceptTargetVisitor
public <V> V acceptTargetVisitor(BindingTargetVisitor<? super T,V> visitor)
Description copied from interface:BindingAccepts a target visitor. Invokes the visitor method specific to this binding's target.- Specified by:
acceptTargetVisitorin interfaceBinding<T>- Parameters:
visitor- to call back on
-
getValue
public T getValue()
Description copied from interface:ConvertedConstantBindingReturns the converted value.- Specified by:
getValuein interfaceConvertedConstantBinding<T>
-
getTypeConverterBinding
public TypeConverterBinding getTypeConverterBinding()
Description copied from interface:ConvertedConstantBindingReturns the type converter binding used to convert the constant.- Specified by:
getTypeConverterBindingin interfaceConvertedConstantBinding<T>
-
getSourceKey
public Key<java.lang.String> getSourceKey()
Description copied from interface:ConvertedConstantBindingReturns the key for the source binding. That binding can be retrieved from an injector usingInjector.getBinding(key).- Specified by:
getSourceKeyin interfaceConvertedConstantBinding<T>
-
getDependencies
public java.util.Set<Dependency<?>> getDependencies()
Description copied from interface:ConvertedConstantBindingReturns a singleton set containing only the converted key.- Specified by:
getDependenciesin interfaceConvertedConstantBinding<T>- Specified by:
getDependenciesin interfaceHasDependencies- Returns:
- a possibly empty set
-
applyTo
public void applyTo(Binder binder)
Description copied from interface:ElementWrites this module element to the given binder (optional operation).
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBindingImpl<T>
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-