Skip to content

Instantly share code, notes, and snippets.

@yayaa
Last active December 23, 2017 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yayaa/e4f06c1cd3c4b5900e01fb2aea1cb76c to your computer and use it in GitHub Desktop.
Save yayaa/e4f06c1cd3c4b5900e01fb2aea1cb76c to your computer and use it in GitHub Desktop.
ComponentDispatcher - 1
class SampleCoreComponentGenerator : CoreComponentGenerator<YourCoreComponent>() {
override fun generate(application: Application): YourCoreComponent {
// Create your component here...
}
}
class Feature1ComponentGenerator : FeatureComponentGenerator<YourFeatureComponent>() {
override fun generate(application: Application, coreComponent: YourCoreComponent?): YourFeatureComponent {
// Create your component here... Please notice, if you don't create
// an implementation of `CoreComponentGenerator` here coreComponent will be null.
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment