Class LambdaHint.Builder

java.lang.Object
org.springframework.aot.hint.LambdaHint.Builder
Enclosing class:
LambdaHint

public static class LambdaHint.Builder extends Object
Since:
7.0.6
Author:
Stephane Nicoll
  • Method Details

    • onReachableType

      public LambdaHint.Builder onReachableType(TypeReference reachableType)
      Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.
      Parameters:
      reachableType - the type that should be reachable for this hint to apply
      Returns:
      this, to facilitate method chaining
    • onReachableType

      public LambdaHint.Builder onReachableType(Class<?> reachableType)
      Make this hint conditional on the fact that the specified type is in a reachable code path from a static analysis point of view.
      Parameters:
      reachableType - the type that should be reachable for this hint to apply
      Returns:
      this, to facilitate method chaining
    • withDeclaringMethod

      public LambdaHint.Builder withDeclaringMethod(String name, List<TypeReference> parameterTypes)
      Set the method that declares the lambda.
      Parameters:
      name - the name of the method
      parameterTypes - the parameter types, if any.
      Returns:
      this, to facilitate method chaining
    • withDeclaringMethod

      public LambdaHint.Builder withDeclaringMethod(String name, Class<?>... parameterTypes)
      Set the method that declares the lambda.
      Parameters:
      name - the name of the method
      parameterTypes - the parameter types, if any.
      Returns:
      this, to facilitate method chaining
    • withInterfaces

      public LambdaHint.Builder withInterfaces(TypeReference... interfaces)
      Add the specified interfaces that the lambda should implement.
      Parameters:
      interfaces - the interfaces the lambda should implement
      Returns:
      this, to facilitate method chaining
    • withInterfaces

      public LambdaHint.Builder withInterfaces(Class<?>... interfaces)
      Add the specified interfaces that the lambda should implement.
      Parameters:
      interfaces - the interfaces the lambda should implement
      Returns:
      this, to facilitate method chaining
    • build

      public LambdaHint build()