Example() { dependency = new Dependency(); } } VS public class Example { private final Dependency dependency; public Example(Dependency dependency) { this.dependency = dependency; } }
Example() { dependency = new Dependency(); } } VS public class Example { private final Dependency dependency; public Example(Dependency dependency) { this.dependency = dependency; } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }
provideWriter() { return new PrinterWriter(); } } @Module( includes = MyModule.class, overrides = true ) public final class TestModule { @Provides Writer provideWriter() { return new TestWriter(); } }