Given an interface like
interface Builder<R> {
    fun build() : R
}
How do I generate a class BooBuilder which implements this interface using kotlinpoet.
I couldn't find an example on creating a generic interface (or class) in the documentation.
what I would like would start with
class BooBuilder(): Builder<Boo> { //...
I understand that I should start with
TypeSpec
  .classBuilder("BooBuilder")
  .addSuperinterface( /* I have no idea what to put here */ )
  // add methods
 
                        
You can pass a
ParameterizedTypeNameas a parameter toaddSuperinterface. To create theParameterizedTypeNameyou can useKClass<*>.parameterizedByextention functionExample
Output