Package com.tangosol.util
Class BuilderHelper
java.lang.Object
com.tangosol.util.BuilderHelper
Provides a collection of helper methods for working with
Builder
s.- Author:
- bo 2012.10.26
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Builder
<T> using
(ParameterizedBuilder<T> bldr, ParameterResolver resolver, ClassLoader loader, ParameterList list) Adapts aParameterizedBuilder
into aBuilder
.static <T> Builder
<T> using
(T t) Creates aBuilder
that returns a specified object, for each invocation ofBuilder.realize()
.
-
Constructor Details
-
BuilderHelper
public BuilderHelper()
-
-
Method Details
-
using
Creates aBuilder
that returns a specified object, for each invocation ofBuilder.realize()
.- Type Parameters:
T
- the type of object to realize- Parameters:
t
- the instance to return- Returns:
- a
Builder
implementation that returns the specified instance whenBuilder.realize()
is invoked
-
using
public static <T> Builder<T> using(ParameterizedBuilder<T> bldr, ParameterResolver resolver, ClassLoader loader, ParameterList list) Adapts aParameterizedBuilder
into aBuilder
.- Type Parameters:
T
- the type of object to realize- Parameters:
bldr
- theParameterizedBuilder
resolver
- theParameterResolver
for the builderloader
- theClassLoader
list
- (optional) theParameterList
- Returns:
- a
Builder
that will realize an instance using the specifiedParameterizedBuilder
-