Created
July 5, 2020 03:19
-
-
Save cesar1000/d4d31184add91df64bead71114a04ce6 to your computer and use it in GitHub Desktop.
Indeterministic Kapt stub generation
This file contains hidden or 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
class BlockUserItemHydrator() : RichFeedbackActionItemHydrator<TwitterUser, RichFeedbackBehaviorBlockUser> { | |
override fun RichFeedbackBehaviorBlockUser.hydrate(): Pair<RichFeedbackBehaviorBlockUser, TwitterUser?> = | |
RichFeedbackBehaviorBlockUser.DEFAULT to null | |
override fun getPrompt(data: TwitterUser): String = "" // implementation removed | |
@HorizonIcon | |
override fun getIcon(data: TwitterUser): String? = null // implementation removed | |
} |
This file contains hidden or 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
interface RichFeedbackActionItemHydrator<Data, RFB : RichFeedbackBehavior> { | |
fun RFB.hydrate(): Pair<RFB, Data?> | |
/** This comment is discarded, since the method is overridden. */ | |
fun getPrompt(data: Data): String? = null | |
/** This comment is picked up only if this interface is in the compilation. */ | |
fun getConfirmation(data: Data): String? = null | |
@HorizonIcon | |
fun getIcon(data: Data): String? | |
fun hydrate( | |
prompt: FeedbackAction.PromptInfo, | |
feedback: RFB | |
): FeedbackAction.PromptInfo? = null // implementation removed | |
fun hydrate( | |
action: FeedbackAction, | |
behavior: RFB | |
): FeedbackAction? = null // implementation removed | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment