LambdaSafe Class — spring-boot Architecture
Architecture documentation for the LambdaSafe class in LambdaSafe.java from the spring-boot codebase.
Entity Profile
Relationship Graph
Source Code
core/spring-boot/src/main/java/org/springframework/boot/util/LambdaSafe.java lines 45–77
public final class LambdaSafe {
private static final @Nullable Method CLASS_GET_MODULE;
private static final @Nullable Method MODULE_GET_NAME;
static {
CLASS_GET_MODULE = ReflectionUtils.findMethod(Class.class, "getModule");
MODULE_GET_NAME = (CLASS_GET_MODULE != null)
? ReflectionUtils.findMethod(CLASS_GET_MODULE.getReturnType(), "getName") : null;
}
private LambdaSafe() {
}
/**
* Start a call to a single callback instance, dealing with common generic type
* concerns and exceptions.
* @param callbackType the callback type (a {@link FunctionalInterface functional
* interface})
* @param callbackInstance the callback instance (may be a lambda)
* @param argument the primary argument passed to the callback
* @param additionalArguments any additional arguments passed to the callback
* @param <C> the callback type
* @param <A> the primary argument type
* @return a {@link Callback} instance that can be invoked.
*/
public static <C, A> Callback<C, A> callback(Class<C> callbackType, C callbackInstance, A argument,
@Nullable Object @Nullable ... additionalArguments) {
Assert.notNull(callbackType, "'callbackType' must not be null");
Assert.notNull(callbackInstance, "'callbackInstance' must not be null");
return new Callback<>(callbackType, callbackInstance, argument, additionalArguments);
}
Domain
Source
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free