Package org.keycloak.models.map.common
Class DeepCloner.Builder
- java.lang.Object
- 
- org.keycloak.models.map.common.DeepCloner.Builder
 
- 
- Enclosing class:
- DeepCloner
 
 public static class DeepCloner.Builder extends Object Builder for theDeepClonerhelper class.
- 
- 
Constructor SummaryConstructors Constructor Description Builder()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description DeepClonerbuild()Returns aDeepClonerinitialized with the respective constructors and cloners.<V> DeepCloner.Buildercloner(Class<? extends V> clazz, DeepCloner.Cloner<?> cloner)Adds a method that copies (as in a deep copy) an object properties from one object to another<V> DeepCloner.Buildercloner(Class<? extends V> clazz, DeepCloner.Cloner<?> clonerWithId, DeepCloner.Cloner<?> clonerWithoutId)Adds a method that copies (as in a deep copy) an object properties from one object to another<V> DeepCloner.Builderconstructor(Class<V> clazz, Function<DeepCloner,? extends V> constructor)Adds a method, often a constructor, that instantiates a record of typeV.<V> DeepCloner.BuilderdelegateCreator(Class<V> clazz, DeepCloner.DelegateCreator<V> delegateCreator)Adds a method, often a constructor, that instantiates a delegate of typeV.<V> DeepCloner.BuilderdelegateCreator(Class<V> clazz, DeepCloner.EntityFieldDelegateCreator<V> delegateCreator)Adds a method that instantiates an per-field delegate of typeV.<V> DeepCloner.BuildergenericCloner(DeepCloner.Cloner<V> genericCloner)Adds a method that copies (as in a deep copy) an object properties to another object for any class that is not covered by a specific cloner set via#cloner(Class, BiFunction)method.
 
- 
- 
- 
Method Detail- 
buildpublic DeepCloner build() Returns aDeepClonerinitialized with the respective constructors and cloners.- Returns:
 
 - 
constructorpublic <V> DeepCloner.Builder constructor(Class<V> clazz, Function<DeepCloner,? extends V> constructor) Adds a method, often a constructor, that instantiates a record of typeV.- Type Parameters:
- V- Class or interface that would be instantiated by the given methods
- Parameters:
- clazz- Class or interface that would be instantiated by the given methods
- constructor- Function that creates a new instance of class- V. If- null, such a single-parameter constructor is not available.
- Returns:
- This builder.
 
 - 
delegateCreatorpublic <V> DeepCloner.Builder delegateCreator(Class<V> clazz, DeepCloner.EntityFieldDelegateCreator<V> delegateCreator) Adds a method that instantiates an per-field delegate of typeV.- Type Parameters:
- V- Class or interface that would be instantiated by the given methods
- Parameters:
- clazz- Class or interface that would be instantiated by the given methods
- delegateCreator- Function that creates a new instance of class- V. If- null, such a single-parameter constructor is not available.
- Returns:
- This builder.
 
 - 
delegateCreatorpublic <V> DeepCloner.Builder delegateCreator(Class<V> clazz, DeepCloner.DelegateCreator<V> delegateCreator) Adds a method, often a constructor, that instantiates a delegate of typeV.- Type Parameters:
- V- Class or interface that would be instantiated by the given methods
- Parameters:
- clazz- Class or interface that would be instantiated by the given methods
- delegateCreator- Function that creates a new instance of class- V. If- null, such a single-parameter constructor is not available.
- Returns:
- This builder.
 
 - 
clonerpublic <V> DeepCloner.Builder cloner(Class<? extends V> clazz, DeepCloner.Cloner<?> cloner) Adds a method that copies (as in a deep copy) an object properties from one object to another- Type Parameters:
- V- Class or interface whose instance would be copied over to another instance by the given cloner
- Parameters:
- clazz- Class or interface whose instance would be copied over to another instance by the given cloner
- cloner- A method for cloning with the following signature:- V deepClone(V from, V to)which copies properties of an object- fromonto the object- to. This function usually returns- to
- Returns:
- This builder.
 
 - 
clonerpublic <V> DeepCloner.Builder cloner(Class<? extends V> clazz, DeepCloner.Cloner<?> clonerWithId, DeepCloner.Cloner<?> clonerWithoutId) Adds a method that copies (as in a deep copy) an object properties from one object to another- Type Parameters:
- V- Class or interface whose instance would be copied over to another instance by the given cloner
- Parameters:
- clazz- Class or interface whose instance would be copied over to another instance by the given cloner
- clonerWithId- A method for cloning with the following signature:- V deepClone(V from, V to)which copies properties of an object- fromonto the object- to. This function usually returns- to
- Returns:
- This builder.
 
 - 
genericClonerpublic <V> DeepCloner.Builder genericCloner(DeepCloner.Cloner<V> genericCloner) Adds a method that copies (as in a deep copy) an object properties to another object for any class that is not covered by a specific cloner set via#cloner(Class, BiFunction)method.- Type Parameters:
- V- Class or interface whose instance would be copied over to another instance by the given cloner
- Parameters:
- genericCloner- A method for cloning which copies properties of an object onto another object. This function usually returns- to
- Returns:
- This builder.
 
 
- 
 
-