com.google.inject.spi.RequireExactBindingAnnotationsOption 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 exact binding annotations.
*/
public final class RequireExactBindingAnnotationsOption implements Element {
private final Object source;
RequireExactBindingAnnotationsOption(Object source) {
this.source = checkNotNull(source, "source");
}
public Object getSource() {
return source;
}
public void applyTo(Binder binder) {
binder.withSource(getSource()).requireExactBindingAnnotations();
}
public T acceptVisitor(ElementVisitor visitor) {
return visitor.visit(this);
}
}