public interface ParameterizedBuilder<T>
ParameterizedBuilder
is an implementation of the classic Builder Pattern that utilizes a
ParameterResolver
to resolve any required runtime Parameter
s necessary for realizing an object.
ParameterizedBuilder
s are typically used to:
1. encapsulate the ability to dynamically configure the mechanism to realize/create/construct/resolve objects of a required type at runtime, typically based on some externally defined and parameterized configuration.
2. allow developers to postpone the creation of required objects at runtime, thus allowing lazy initialization of system components.
Modifier and Type | Interface and Description |
---|---|
static interface |
ParameterizedBuilder.ReflectionSupport
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
T |
realize(com.tangosol.config.expression.ParameterResolver resolver,
ClassLoader loader,
ParameterList listParameters)
Realizes (creates if necessary) an instance of a object of type T, using the provided
ParameterResolver
to resolve values any referenced Parameter s. |
T realize(com.tangosol.config.expression.ParameterResolver resolver, ClassLoader loader, ParameterList listParameters)
ParameterResolver
to resolve values any referenced Parameter
s.resolver
- the ParameterResolver
for resolving named Parameter
sloader
- the ClassLoader
for loading any necessary classes and if null
the
ClassLoader
used to load the builder will be used insteadlistParameters
- an optional ParameterList
(may be null
) to be used for realizing the
instance, eg: used as constructor parameters