Created
January 13, 2017 08:21
-
-
Save yusufiga/b7f2283ec1199734487601e164acf5ee to your computer and use it in GitHub Desktop.
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
bind\((.+?).class\).toProvider\((.)(.+?).class\).in\(com.google.inject.Singleton.class\); | |
@Singleton\n@Binds\npublic abstract $1 bind$1($2$3 \L$2\E$3); | |
bind\(new TypeLiteral<(.+?)<(.+?)>>\(\) \{\n \}\).to\((.)(.+?).class\).in\(com.google.inject.Singleton.class\); | |
@Singleton\n@Binds\npublic abstract $1<$2> bind$1$2($3$4 \L$3\E$4);\n | |
@Bind for bind(IYourInterface.clas).to(YourImplementation.class) in abstract method | |
@Provide @Singleton for bind(IYourInterface.clas).toInstance(new YourImplementation()) | |
@Singleton for bind(YourCalass.class).in(Singleton.class) | |
Lombok is not fully compilable with Dagger2 and data binding combination |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment