class ModelBuilderInterfaceWriter : Asyncable
Creates an interface for a generated model that contains all of the valid setters for building a model in an EpoxyController. This allows us to expose the interface when building a model and hide all of the non applicable junk that shouldn't be used when building a model (eg equals/bind/toString etc)
We can also hide the setters that are legacy from usage with EpoxyAdapter.
data class InterfaceDetails |
|
class MethodDetails
A wrapper around MethodSpec that allows us to compare methods with equality that only checks name and param types. This prevents things like annotations and param name from affecting equality, and gets us closer to checking the actual method signature. |
|
class ParamDetails
A wrapper around ParameterSpec that allows us to compare params with equality that only checks param type. This prevents things like annotations and param name from affecting equality. |
ModelBuilderInterfaceWriter(filer: Filer, types: Types, asyncable: Asyncable)
Creates an interface for a generated model that contains all of the valid setters for building a model in an EpoxyController. This allows us to expose the interface when building a model and hide all of the non applicable junk that shouldn't be used when building a model (eg equals/bind/toString etc) |
val asyncable: Asyncable |
|
val types: Types |
suspend fun writeFilesForViewInterfaces(): Unit
We need to gather information about all of the view interfaces first, and then write the interface classes. |
|
fun writeInterface(modelInfo: GeneratedModelInfo, methods: MutableList<MethodSpec>): TypeName |
fun Any.mutex(): Mutex |