Class LambdaHint

java.lang.Object
org.springframework.aot.hint.LambdaHint
All Implemented Interfaces:
ConditionalHint

public final class LambdaHint extends Object implements ConditionalHint
A hint that describes the need of reflection for a Lambda.
Since:
7.0.6
Author:
Stephane Nicoll
  • Method Details

    • of

      public static LambdaHint.Builder of(TypeReference declaringClass)
      Initialize a builder with the class declaring the lambda.
      Parameters:
      declaringClass - the type declaring the lambda
      Returns:
      a builder for the hint
    • of

      public static LambdaHint.Builder of(Class<?> declaringClass)
      Initialize a builder with the class declaring the lambda.
      Parameters:
      declaringClass - the type declaring the lambda
      Returns:
      a builder for the hint
    • getDeclaringClass

      public TypeReference getDeclaringClass()
      Return the type declaring the lambda.
      Returns:
      the declaring class
    • getReachableType

      public @Nullable TypeReference getReachableType()
      Description copied from interface: ConditionalHint
      Return the type that should be reachable for this hint to apply, or null if this hint should always been applied.
      Specified by:
      getReachableType in interface ConditionalHint
      Returns:
      the reachable type, if any
    • getDeclaringMethod

      public @Nullable LambdaHint.DeclaringMethod getDeclaringMethod()
      Return the method in which the lambda is defined, if any.
      Returns:
      the declaring method
    • getInterfaces

      public List<TypeReference> getInterfaces()
      Return the interfaces that are implemented by the lambda.
      Returns:
      the interfaces