mirror of
https://github.com/google/guice.git
synced 2024-04-21 12:32:36 +00:00
Make AbstractModule.binder private, for a hair more encapsulation.
PiperOrigin-RevId: 555492476
This commit is contained in:
@@ -53,7 +53,7 @@ import org.aopalliance.intercept.MethodInterceptor;
|
||||
*/
|
||||
public abstract class AbstractModule implements Module {
|
||||
|
||||
Binder binder;
|
||||
private Binder binder;
|
||||
|
||||
@Override
|
||||
public final synchronized void configure(Binder builder) {
|
||||
|
||||
@@ -438,8 +438,8 @@ public class CircularDependencyTest extends TestCase {
|
||||
new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
binder.bind(A.class).to(E.class);
|
||||
binder.bind(B.class).to(E.class);
|
||||
bind(A.class).to(E.class);
|
||||
bind(B.class).to(E.class);
|
||||
}
|
||||
});
|
||||
injector.getInstance(A.class);
|
||||
@@ -452,8 +452,8 @@ public class CircularDependencyTest extends TestCase {
|
||||
@Override
|
||||
protected void configure() {
|
||||
binder().disableCircularProxies();
|
||||
binder.bind(A.class).to(E.class);
|
||||
binder.bind(B.class).to(E.class);
|
||||
bind(A.class).to(E.class);
|
||||
bind(B.class).to(E.class);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ public class JitBindingsTest extends TestCase {
|
||||
new AbstractModule() {
|
||||
@Override
|
||||
protected void configure() {
|
||||
binder.requireExplicitBindings();
|
||||
binder().requireExplicitBindings();
|
||||
bind(Foo.class).to(ScopedFooImpl.class);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user