Class KotlinCompilationUnit
java.lang.Object
io.spring.initializr.generator.language.CompilationUnit<KotlinTypeDeclaration>
io.spring.initializr.generator.language.kotlin.KotlinCompilationUnit
A Kotlin-specific
CompilationUnit
.- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTopLevelFunction
(KotlinFunctionDeclaration function) Adds the given function as a top level function.protected KotlinTypeDeclaration
Returns the top level functions.Methods inherited from class io.spring.initializr.generator.language.CompilationUnit
createTypeDeclaration, getName, getPackageName, getTypeDeclarations
-
Method Details
-
doCreateTypeDeclaration
- Specified by:
doCreateTypeDeclaration
in classCompilationUnit<KotlinTypeDeclaration>
-
addTopLevelFunction
Adds the given function as a top level function.- Parameters:
function
- the function to add
-
getTopLevelFunctions
Returns the top level functions.- Returns:
- the top level functions
-