https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
m

mbonnin

10/27/2021, 2:35 PM
Something like below should do:
Copy code
FileSpec.builder(packagename, filename)
	.addType(TypeSpec.interfaceBuilder("I").addTypeVariable(TypeVariableName("T")).build())
	.addType(TypeSpec.classBuilder("C").addSuperinterface(ClassName(packageName, "I").parameterizedBy(String::class.java.asClassName())).build())
	.build()
👌 1
l

LastExceed

10/27/2021, 3:26 PM
thanks!
2 Views