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

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

package com.google.inject.spi;

import com.google.inject.Binder;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * A request to require explicit bindings.
 */
public final class RequireExplicitBindingsOption implements Element {
    private final Object source;

    RequireExplicitBindingsOption(Object source) {
        this.source = checkNotNull(source, "source");
    }

    public Object getSource() {
        return source;
    }

    public void applyTo(Binder binder) {
        binder.withSource(getSource()).requireExplicitBindings();
    }

    public  T acceptVisitor(ElementVisitor visitor) {
        return visitor.visit(this);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy