com.google.inject.spi.ConvertedConstantBinding Maven / Gradle / Ivy
package com.google.inject.spi;
import com.google.inject.Binding;
import com.google.inject.Key;
import 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.
*/
public interface ConvertedConstantBinding extends Binding, HasDependencies {
/**
* Returns the converted value.
*/
T getValue();
/**
* Returns the type converter binding used to convert the constant.
*/
TypeConverterBinding getTypeConverterBinding();
/**
* Returns the key for the source binding. That binding can be retrieved from an injector using
* {@link com.google.inject.Injector#getBinding(Key) Injector.getBinding(key)}.
*/
Key getSourceKey();
/**
* Returns a singleton set containing only the converted key.
*/
Set> getDependencies();
}