Class AggregateCloner.Builder
java.lang.Object
com.comphenix.protocol.reflect.cloning.AggregateCloner.Builder
- Enclosing class:
AggregateCloner
Represents a builder for aggregate (combined) cloners.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionandThen(com.google.common.base.Function<AggregateCloner.BuilderParameters, Cloner> factory) Add the next cloner that will be considered in turn.Add the next cloner that will be considered in turn.build()Build a new aggregate cloner using the supplied values.instanceProvider(InstanceProvider provider) Set the instance provider supplied to all cloners in this builder.
-
Constructor Details
-
Builder
public Builder()Create a new aggregate builder.
-
-
Method Details
-
instanceProvider
Set the instance provider supplied to all cloners in this builder.- Parameters:
provider- - new instance provider.- Returns:
- The current builder.
-
andThen
Add the next cloner that will be considered in turn.- Parameters:
type- - the type of the next cloner.- Returns:
- This builder.
-
andThen
public AggregateCloner.Builder andThen(com.google.common.base.Function<AggregateCloner.BuilderParameters, Cloner> factory) Add the next cloner that will be considered in turn.- Parameters:
factory- - factory constructing the next cloner.- Returns:
- This builder.
-
build
Build a new aggregate cloner using the supplied values.- Returns:
- A new aggregate cloner.
-