Package io.micronaut.sourcegen.model
Class LambdaDef
java.lang.Object
io.micronaut.sourcegen.model.LambdaDef
Definition holding information about a lambda interface that can be implemented.
Use
ClassTypeDef.getLambda()
to create an instance from an existing type definition.- Since:
- 1.7
- Author:
- Denis Stepanov
-
Method Summary
Modifier and TypeMethodDescriptiongetType()
implement
(MethodDef.MethodBodyBuilder lambdaBuilder) Implement lambda by providing the method body.implement
(Map<String, TypeDef> resolvedTypeVariables, MethodDef.MethodBodyBuilder lambdaBuilder) Implement lambda by providing the method body and the particular type variables for implementing a generic lambda.
-
Method Details
-
implement
Implement lambda by providing the method body.- Parameters:
lambdaBuilder
- The lambda builder- Returns:
- the lambda expression
- Since:
- 1.7
-
implement
public ExpressionDef.Lambda implement(Map<String, TypeDef> resolvedTypeVariables, MethodDef.MethodBodyBuilder lambdaBuilder) Implement lambda by providing the method body and the particular type variables for implementing a generic lambda.- Parameters:
resolvedTypeVariables
- The resolved type variables of the method.lambdaBuilder
- The lambda builder- Returns:
- the lambda expression
- Since:
- 1.7
-
getType
- Returns:
- The lambda type
-
getMethod
- Returns:
- The lambda method
-