Class FieldAccessingSolutionCloner.FieldAccessingSolutionClonerRun
- java.lang.Object
-
- org.optaplanner.core.impl.domain.solution.cloner.FieldAccessingSolutionCloner.FieldAccessingSolutionClonerRun
-
- Enclosing class:
- FieldAccessingSolutionCloner<Solution_>
protected class FieldAccessingSolutionCloner.FieldAccessingSolutionClonerRun extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<Object,Object>
originalToCloneMap
protected Queue<FieldAccessingSolutionCloner.Unprocessed>
unprocessedQueue
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldAccessingSolutionClonerRun()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <C> C
clone(C original)
protected Object
cloneArray(Class<?> expectedType, Object originalArray)
protected <E> Collection<E>
cloneCollection(Class<?> expectedType, Collection<E> originalCollection)
protected <C> C
cloneCollectionsElementIfNeeded(C original)
protected <K,V>
Map<K,V>cloneMap(Class<?> expectedType, Map<K,V> originalMap)
protected Solution_
cloneSolution(Solution_ originalSolution)
protected <C> C
constructClone(Class<C> clazz)
protected <E> Collection<E>
constructCloneCollection(Collection<E> originalCollection)
protected <K,V>
Map<K,V>constructCloneMap(Map<K,V> originalMap)
protected <C> void
copyFields(Class<C> clazz, Class<? extends C> instanceClass, C original, C clone)
protected Object
getFieldValue(Object bean, Field field)
protected boolean
isDeepCloneField(Field field, Class<?> fieldInstanceClass, Object originalValue)
protected void
process(FieldAccessingSolutionCloner.Unprocessed unprocessed)
protected void
processQueue()
protected void
setFieldValue(Object bean, Field field, Object value)
protected void
validateCloneSolution(Solution_ originalSolution, Solution_ cloneSolution)
Fails fast ifDeepCloningUtils.isFieldAnEntityPropertyOnSolution(java.lang.reflect.Field, java.lang.Class<?>)
assumptions were wrong.
-
-
-
Field Detail
-
unprocessedQueue
protected Queue<FieldAccessingSolutionCloner.Unprocessed> unprocessedQueue
-
-
Method Detail
-
clone
protected <C> C clone(C original)
-
constructClone
protected <C> C constructClone(Class<C> clazz)
-
copyFields
protected <C> void copyFields(Class<C> clazz, Class<? extends C> instanceClass, C original, C clone)
-
isDeepCloneField
protected boolean isDeepCloneField(Field field, Class<?> fieldInstanceClass, Object originalValue)
-
processQueue
protected void processQueue()
-
process
protected void process(FieldAccessingSolutionCloner.Unprocessed unprocessed)
-
cloneCollection
protected <E> Collection<E> cloneCollection(Class<?> expectedType, Collection<E> originalCollection)
-
constructCloneCollection
protected <E> Collection<E> constructCloneCollection(Collection<E> originalCollection)
-
cloneCollectionsElementIfNeeded
protected <C> C cloneCollectionsElementIfNeeded(C original)
-
validateCloneSolution
protected void validateCloneSolution(Solution_ originalSolution, Solution_ cloneSolution)
Fails fast ifDeepCloningUtils.isFieldAnEntityPropertyOnSolution(java.lang.reflect.Field, java.lang.Class<?>)
assumptions were wrong.- Parameters:
originalSolution
- never nullcloneSolution
- never null
-
-