Package javax.cache.configuration
Class FactoryBuilder
java.lang.Object
javax.cache.configuration.FactoryBuilder
A convenience class that defines generically typed static methods to aid in
the building of
Factory
instances.
Factory
is used by MutableConfiguration
to avoid adding
non-Serializable instances that would assume usage in the local JVM.
Two styles of builder are available:
Factory instances can also be created in other ways.- Since:
- 1.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
A private constructor to prevent instantiation. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> Factory
<T> Constructs aFactory
that will produce factory instances of the specified class.static <T> Factory
<T> Constructs aFactory
that will produce factory instances of the specified class.static <T extends Serializable>
Factory<T> factoryOf
(T instance) Constructs aFactory
that will return the specified factory Serializable instance.
-
Constructor Details
-
FactoryBuilder
private FactoryBuilder()A private constructor to prevent instantiation.
-
-
Method Details
-
factoryOf
Constructs aFactory
that will produce factory instances of the specified class.The specified class must have a no-args constructor.
-
factoryOf
Constructs aFactory
that will produce factory instances of the specified class.The specified class must have a no-args constructor.
-
factoryOf
Constructs aFactory
that will return the specified factory Serializable instance.If T is not Serializable use
factoryOf(Class)
orfactoryOf(String)
.
-