public final class LazyBean<T> extends Object
BeanFactory.getBean(Class) many
times or throwing an exception.
Note: This is an internal class to sleuth and must not be used by external code.
| Modifier and Type | Method and Description |
|---|---|
static <T> LazyBean<T> |
create(org.springframework.context.ConfigurableApplicationContext springContext,
Class<T> requiredType) |
T |
get()
Attempts to provision from the underlying bean factory, if not already provisioned.
|
T |
getOrError()
Attempts to provision from the underlying bean factory, if not already provisioned.
|
public static <T> LazyBean<T> create(org.springframework.context.ConfigurableApplicationContext springContext, Class<T> requiredType)
@Nullable public T get()
public T getOrError()
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.