Class LambdaHint.Builder
java.lang.Object
org.springframework.aot.hint.LambdaHint.Builder
- Enclosing class:
LambdaHint
- Since:
- 7.0.6
- Author:
- Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionbuild()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.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.withDeclaringMethod(String name, Class<?>... parameterTypes) Set the method that declares the lambda.withDeclaringMethod(String name, List<TypeReference> parameterTypes) Set the method that declares the lambda.withInterfaces(Class<?>... interfaces) Add the specified interfaces that the lambda should implement.withInterfaces(TypeReference... interfaces) Add the specified interfaces that the lambda should implement.
-
Method Details
-
onReachableType
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
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
Set the method that declares the lambda.- Parameters:
name- the name of the methodparameterTypes- the parameter types, if any.- Returns:
this, to facilitate method chaining
-
withDeclaringMethod
Set the method that declares the lambda.- Parameters:
name- the name of the methodparameterTypes- the parameter types, if any.- Returns:
this, to facilitate method chaining
-
withInterfaces
Add the specified interfaces that the lambda should implement.- Parameters:
interfaces- the interfaces the lambda should implement- Returns:
this, to facilitate method chaining
-
withInterfaces
Add the specified interfaces that the lambda should implement.- Parameters:
interfaces- the interfaces the lambda should implement- Returns:
this, to facilitate method chaining
-
build
-