/** * Qualify this binding key with the given instance of an annotation. * * This can be used to specify bindings with annotations that have particular values. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final A instance) { return underlying.qualifiedWith(instance).asJava(); }
/** * Qualify this binding key with the given instance of an annotation. * * This can be used to specify bindings with annotations that have particular values. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final A instance) { return underlying.qualifiedWith(instance).asJava(); }
/** * Qualify this binding key with the given instance of an annotation. * * This can be used to specify bindings with annotations that have particular values. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final A instance) { return underlying.qualifiedWith(instance).asJava(); }
public BindingKey<T> getKey() { return underlying.key().asJava(); }
public BindingKey<? extends T> getKey() { return underlying.key().asJava(); }
public BindingKey<T> getKey() { return underlying.key().asJava(); }
public BindingKey<T> getKey() { return underlying.key().asJava(); }
public BindingKey<? extends T> getKey() { return underlying.key().asJava(); }
public BindingKey<? extends T> getKey() { return underlying.key().asJava(); }
/** * Qualify this binding key with the given name. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may decide to name the cached one: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith("cached").to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Named("cached") Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached `Foo` service. */ public BindingKey<T> qualifiedWith(final String name) { return underlying.qualifiedWith(name).asJava(); }
/** * Qualify this binding key with the given annotation. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may define a Cached annotation: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith(Cached.class).to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Cached Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached {@code Foo} service. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final Class<A> annotation) { return underlying.qualifiedWith(annotation).asJava(); }
/** * Qualify this binding key with the given annotation. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may define a Cached annotation: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith(Cached.class).to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Cached Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached {@code Foo} service. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final Class<A> annotation) { return underlying.qualifiedWith(annotation).asJava(); }
/** * Qualify this binding key with the given name. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may decide to name the cached one: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith("cached").to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Named("cached") Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached `Foo` service. */ public BindingKey<T> qualifiedWith(final String name) { return underlying.qualifiedWith(name).asJava(); }
/** * Qualify this binding key with the given annotation. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may define a Cached annotation: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith(Cached.class).to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Cached Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached {@code Foo} service. */ public <A extends Annotation> BindingKey<T> qualifiedWith(final Class<A> annotation) { return underlying.qualifiedWith(annotation).asJava(); }
/** * Qualify this binding key with the given name. * * For example, you may have both a cached implementation, and a direct implementation of a service. To differentiate * between them, you may decide to name the cached one: * * <pre> * {@code * bindClass(Foo.class).qualifiedWith("cached").to(FooCached.class), * bindClass(Foo.class).to(FooImpl.class) * * ... * * class MyController { * {@literal @}Inject * MyController({@literal @}Named("cached") Foo foo) { * ... * } * ... * } * } * </pre> * * In the above example, the controller will get the cached `Foo` service. */ public BindingKey<T> qualifiedWith(final String name) { return underlying.qualifiedWith(name).asJava(); }