All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.inject.binder.LinkedBindingBuilder Maven / Gradle / Ivy

package com.google.inject.binder;

import com.google.inject.Key;
import com.google.inject.Provider;
import com.google.inject.TypeLiteral;

import java.lang.reflect.Constructor;

/**
 * See the EDSL examples at {@link com.google.inject.Binder}.
 *
 */
public interface LinkedBindingBuilder extends ScopedBindingBuilder {

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder to(Class implementation);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder to(TypeLiteral implementation);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder to(Key targetKey);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     *
     * @see com.google.inject.Injector#injectMembers
     */
    void toInstance(T instance);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     *
     * @see com.google.inject.Injector#injectMembers
     */
    ScopedBindingBuilder toProvider(Provider provider);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     *
     * @see com.google.inject.Injector#injectMembers
     */
    ScopedBindingBuilder toProvider(javax.inject.Provider provider);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder toProvider(Class> providerType);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder toProvider(TypeLiteral> providerType);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
    ScopedBindingBuilder toProvider(Key> providerKey);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
     ScopedBindingBuilder toConstructor(Constructor constructor);

    /**
     * See the EDSL examples at {@link com.google.inject.Binder}.
     */
     ScopedBindingBuilder toConstructor(Constructor constructor, TypeLiteral type);
}