com.google.inject.spi.DisableCircularProxiesOption Maven / Gradle / Ivy
package com.google.inject.spi;
import com.google.inject.Binder;
import static com.google.common.base.Preconditions.checkNotNull;
/**
* A request to disable circular proxies.
*/
public final class DisableCircularProxiesOption implements Element {
private final Object source;
DisableCircularProxiesOption(Object source) {
this.source = checkNotNull(source, "source");
}
@Override
public Object getSource() {
return source;
}
@Override
public void applyTo(Binder binder) {
binder.withSource(getSource()).disableCircularProxies();
}
@Override
public T acceptVisitor(ElementVisitor visitor) {
return visitor.visit(this);
}
}