Class LambdaDef

java.lang.Object
io.micronaut.sourcegen.model.LambdaDef

public final class LambdaDef extends Object
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 Details

    • implement

      public ExpressionDef.Lambda implement(MethodDef.MethodBodyBuilder lambdaBuilder)
      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

      public ClassTypeDef getType()
      Returns:
      The lambda type
    • getMethod

      public MethodDef getMethod()
      Returns:
      The lambda method