addPrivateField

open fun addPrivateField(typeClass: Class<out Any>, name: String): FieldDeclaration(source)

Add a private field to this.

Return

the FieldDeclaration created

Parameters

typeClass

the type of the field

name

the name of the field


Add a private field to this and automatically add the import of the type if needed.

Return

the FieldDeclaration created

Parameters

type

the type of the field

name

the name of the field


Add a private field to this.

Return

the FieldDeclaration created

Parameters

type

the type of the field

name

the name of the field