Package io.micronaut.sourcegen.model
Class MethodDef
java.lang.Object
io.micronaut.sourcegen.model.MethodDef
The method definition.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
The method builder definition. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MethodDef.MethodDefBuilder
static MethodDef.MethodDefBuilder
static MethodDef
constructor
(ClassTypeDef thisType, Collection<ParameterDef> parameterDefs, Modifier... modifiers) Create a new constructor with parameters assigned to fields with the same name.@Nullable ParameterDef
findParameter
(String name) final List<AnnotationDef>
final Modifier[]
final String
getName()
@NonNull ParameterDef
getParameter
(String name) boolean
-
Field Details
-
name
-
modifiers
-
-
Method Details
-
constructor
- Returns:
- Starts a constructor.
-
constructor
public static MethodDef constructor(ClassTypeDef thisType, Collection<ParameterDef> parameterDefs, Modifier... modifiers) Create a new constructor with parameters assigned to fields with the same name.- Parameters:
thisType
- The type to be constructedparameterDefs
- The parameters of the bodymodifiers
- The constructor modifiers- Returns:
- A new constructor with a body.
-
getReturnType
-
getParameters
-
getStatements
-
findParameter
-
getParameter
-
isOverride
public boolean isOverride()- Returns:
- True if method is an override
-
builder
-
getName
-
getModifiers
-
getModifiersArray
-
getAnnotations
-
getJavadoc
-