ContributesFragmentGenerator

@AutoService(value = [CodeGenerator::class])
class ContributesFragmentGenerator : TangleCodeGenerator

Generates a module to create qualified bindings for the Fragment itself

@Module
@ContributesTo(Unit::class)
public interface Tangle_Unit_Fragment_Module {
@Binds
@IntoMap
@FragmentKey(MyFragment::class)
@TangleFragmentProviderMap
public fun bind_MyFragment(@TangleFragmentProviderMap fragment: MyFragment): Fragment

public companion object {
@Provides
@TangleFragmentProviderMap
public fun provide_MyFragment(numbers: @JvmSuppressWildcards List<Int>): MyFragment =
MyFragment_Factory.newInstance(numbers)
}
}

Constructors

Link copied to clipboard
fun ContributesFragmentGenerator()

Functions

Link copied to clipboard
override fun generateCode(codeGenDir: File, module: ModuleDescriptor, projectFiles: Collection<KtFile>): Collection<GeneratedFile>
Link copied to clipboard
open override fun generateTangleCode(codeGenDir: File, module: ModuleDescriptor, projectFiles: Collection<KtFile>): Collection<GeneratedFile>
Link copied to clipboard
override fun isApplicable(context: AnvilContext): Boolean

Sources

Link copied to clipboard