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

com.google.inject.spi.ElementVisitor Maven / Gradle / Ivy

package com.google.inject.spi;

import com.google.inject.Binder;
import com.google.inject.Binding;
import com.google.inject.Inject;

/**
 * Visit elements.
 *
 * @param  any type to be returned by the visit method. Use {@link Void} with
 *            {@code return null} if no return type is needed.
 */
public interface ElementVisitor {

    /**
     * Visit a mapping from a key (type and optional annotation) to the strategy for getting
     * instances of the type.
     */
     V visit(Binding binding);

    /**
     * Visit a registration of a scope annotation with the scope that implements it.
     */
    V visit(ScopeBinding binding);

    /**
     * Visit a registration of type converters for matching target types.
     */
    V visit(TypeConverterBinding binding);

    /**
     * Visit a request to inject the instance fields and methods of an instance.
     */
    V visit(InjectionRequest request);

    /**
     * Visit a request to inject the static fields and methods of type.
     */
    V visit(StaticInjectionRequest request);

    /**
     * Visit a lookup of the provider for a type.
     */
     V visit(ProviderLookup lookup);

    /**
     * Visit a lookup of the members injector.
     */
     V visit(MembersInjectorLookup lookup);

    /**
     * Visit an error message and the context in which it occured.
     */
    V visit(Message message);

    /**
     * Visit a collection of configuration elements for a {@linkplain com.google.inject.PrivateBinder
     * private binder}.
     */
    V visit(PrivateElements elements);

    /**
     * Visit an injectable type listener binding.
     */
    V visit(TypeListenerBinding binding);

    /**
     * Visit a provision listener binding.
     */
    V visit(ProvisionListenerBinding binding);

    /**
     * Visit a require explicit bindings command.
     */
    V visit(RequireExplicitBindingsOption option);

    /**
     * Visit a disable circular proxies command.
     */
    V visit(DisableCircularProxiesOption option);

    /**
     * Visit a require explicit {@literal @}{@link Inject} command.
     */
    V visit(RequireAtInjectOnConstructorsOption option);

    /**
     * Visit a require exact binding annotations command.
     */
    V visit(RequireExactBindingAnnotationsOption option);

    /**
     * Visits a {@link Binder#scanModulesForAnnotatedMethods} command.
     */
    V visit(ModuleAnnotatedMethodScannerBinding binding);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy