Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #181 from JakeWharton/jakew/multibinding-annotatio…
…n/2019-11-19 Add support for @Multibinds annotation
- Loading branch information
Showing
6 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
integration-tests/src/main/java/com/example/MultibindingMapEmpty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.example; | ||
|
||
import dagger.Component; | ||
import dagger.Module; | ||
import dagger.multibindings.Multibinds; | ||
import java.util.Map; | ||
|
||
@Component(modules = MultibindingMapEmpty.Module1.class) | ||
interface MultibindingMapEmpty { | ||
Map<String, String> values(); | ||
|
||
@Module | ||
abstract class Module1 { | ||
@Multibinds | ||
abstract Map<String, String> empty(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
integration-tests/src/main/java/com/example/MultibindingSetEmpty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.example; | ||
|
||
import dagger.Component; | ||
import dagger.Module; | ||
import dagger.multibindings.Multibinds; | ||
import java.util.Set; | ||
|
||
@Component(modules = MultibindingSetEmpty.Module1.class) | ||
interface MultibindingSetEmpty { | ||
Set<String> values(); | ||
|
||
@Module | ||
abstract class Module1 { | ||
@Multibinds | ||
abstract Set<String> empty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
integration-tests/src/test/java/com/example/MultibindsAnnotationWrongType.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.example; | ||
|
||
import dagger.Component; | ||
import dagger.Module; | ||
import dagger.multibindings.Multibinds; | ||
|
||
@Component(modules = MultibindsAnnotationWrongType.Module1.class) | ||
interface MultibindsAnnotationWrongType { | ||
@Module | ||
abstract class Module1 { | ||
@Multibinds | ||
abstract String empty(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters