Class AggregateCloner.Builder

java.lang.Object
com.comphenix.protocol.reflect.cloning.AggregateCloner.Builder
Enclosing class:
AggregateCloner

public static class AggregateCloner.Builder extends Object
Represents a builder for aggregate (combined) cloners.
  • Constructor Details

    • Builder

      public Builder()
      Create a new aggregate builder.
  • Method Details

    • instanceProvider

      public AggregateCloner.Builder instanceProvider(InstanceProvider provider)
      Set the instance provider supplied to all cloners in this builder.
      Parameters:
      provider - - new instance provider.
      Returns:
      The current builder.
    • andThen

      public AggregateCloner.Builder andThen(Class<? extends Cloner> type)
      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

      public AggregateCloner build()
      Build a new aggregate cloner using the supplied values.
      Returns:
      A new aggregate cloner.