Class KotlinFunctionDeclaration.Builder
java.lang.Object
io.spring.initializr.generator.language.kotlin.KotlinFunctionDeclaration.Builder
- Enclosing class:
- KotlinFunctionDeclaration
Builder for creating a
KotlinFunctionDeclaration.-
Method Summary
Modifier and TypeMethodDescriptionSets the body.modifiers(KotlinModifier... modifiers) Sets the modifiers.parameters(Parameter... parameters) Sets the parameters.Sets the return type.
-
Method Details
-
modifiers
Sets the modifiers.- Parameters:
modifiers- the modifiers- Returns:
- this for method chaining
-
returning
Sets the return type.- Parameters:
returnType- the return type- Returns:
- this for method chaining
-
parameters
Sets the parameters.- Parameters:
parameters- the parameters- Returns:
- this for method chaining
-
body
Sets the body.- Parameters:
code- the code for the body- Returns:
- the function declaration containing the body
-