-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
18d06fa
commit 2e91b34
Showing
5 changed files
with
76 additions
and
1 deletion.
There are no files selected for viewing
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
19 changes: 19 additions & 0 deletions
19
src/test/testData/binds/MultipleQualifiers/KFailureComponent.kt
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,19 @@ | ||
import javax.inject.Inject | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.Binds | ||
import assets.Car | ||
import assets.CarImpl | ||
import javax.inject.Singleton | ||
import javax.inject.Named | ||
import assets.PrimaryScope | ||
import assets.PrimaryQualifier | ||
|
||
@Module | ||
abstract class KMultipleQualifier { | ||
|
||
@PrimaryQualifier | ||
@Named | ||
@<error descr="@Binds methods may not use more than one @Qualifier [@PrimaryQualifier, @Named]">Binds</error> | ||
abstract fun getCar(car: CarImpl): Car | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/testData/binds/MultipleQualifiers/KSuccessComponent.kt
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,18 @@ | ||
import javax.inject.Inject | ||
import dagger.Module | ||
import dagger.Provides | ||
import dagger.Binds | ||
import assets.Car | ||
import assets.CarImpl | ||
import javax.inject.Singleton | ||
import javax.inject.Named | ||
import assets.PrimaryScope | ||
import assets.PrimaryQualifier | ||
|
||
@Module | ||
abstract class KSingleQualifier { | ||
|
||
@PrimaryQualifier | ||
@Binds | ||
abstract fun getCar(car: CarImpl): Car | ||
} |
19 changes: 19 additions & 0 deletions
19
src/test/testData/binds/MultipleQualifiers/MultipleQualifier.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,19 @@ | ||
import javax.inject.Inject; | ||
import dagger.Module; | ||
import dagger.Provides; | ||
import dagger.Binds; | ||
import assets.Car; | ||
import assets.CarImpl; | ||
import javax.inject.Singleton; | ||
import javax.inject.Named; | ||
import assets.PrimaryScope; | ||
import assets.PrimaryQualifier; | ||
|
||
@Module | ||
public abstract class MultipleQualifier { | ||
|
||
@PrimaryQualifier | ||
@Named | ||
@<error descr="@Binds methods may not use more than one @Qualifier [@PrimaryQualifier, @Named]">Binds</error> | ||
public abstract Car getCar(CarImpl car); | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/testData/binds/MultipleQualifiers/SingleQualifier.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,18 @@ | ||
import javax.inject.Inject; | ||
import dagger.Module; | ||
import dagger.Provides; | ||
import dagger.Binds; | ||
import assets.Car; | ||
import assets.CarImpl; | ||
import javax.inject.Singleton; | ||
import javax.inject.Named; | ||
import assets.PrimaryScope; | ||
import assets.PrimaryQualifier; | ||
|
||
@Module | ||
public abstract class SingleQualifier { | ||
|
||
@PrimaryQualifier | ||
@Binds | ||
public abstract Car getCar(CarImpl car); | ||
} |