import

fun <T> import(clazz: Class<T>)

Registers a Java class to be imported in generated scripts, by its canonical name, so a nested class is imported as Outer.Inner. Java callers use addImport, since import is a Java keyword.

Parameters

clazz

the class to add to the import list

Type Parameters

T

the type of the class to import

Throws

if clazz has no canonical name (a local, anonymous or hidden class, or an array of one), which Java source cannot name