Package io.micronaut.sourcegen.model
Class MethodDef.MethodDefBuilder
java.lang.Object
io.micronaut.sourcegen.model.AbstractElementBuilder<MethodDef.MethodDefBuilder>
io.micronaut.sourcegen.model.MethodDef.MethodDefBuilder
- Enclosing class:
- MethodDef
public static final class MethodDef.MethodDefBuilder
extends AbstractElementBuilder<MethodDef.MethodDefBuilder>
The method builder definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Field Summary
Fields inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
annotations, javadoc, modifiers, name
-
Method Summary
Modifier and TypeMethodDescriptionaddParameter
(ParameterDef parameterDef) addParameter
(String name, TypeDef type) addParameter
(String name, Class<?> type) addStatement
(StatementDef statement) addStatements
(Collection<StatementDef> newStatements) build()
build
(BiFunction<VariableDef.This, List<ParameterDef>, StatementDef> bodyBuilder) The return type of the method.Methods inherited from class io.micronaut.sourcegen.model.AbstractElementBuilder
addAnnotation, addAnnotation, addAnnotation, addAnnotation, addJavadoc, addModifiers
-
Method Details
-
returns
The return type of the method. In a case of missing return type it will be extracted from the statements.- Parameters:
type
- The return type- Returns:
- the current builder
-
returns
-
addParameter
-
addParameter
-
addParameter
-
addStatement
-
addStatements
-
build
-
build
-