Package org.optaplanner.core.impl.domain.solution.cloner

## 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 if `FieldAccessingSolutionCloner.isFieldAnEntityPropertyOnSolution(java.lang.reflect.Field, java.lang.Class<?>)` assumptions were wrong.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### originalToCloneMap

          protected Map<Object,​Object> originalToCloneMap

    - #### unprocessedQueue

          protected Queue<FieldAccessingSolutionCloner.Unprocessed> unprocessedQueue

  - ### Constructor Detail

    - #### FieldAccessingSolutionClonerRun

          protected FieldAccessingSolutionClonerRun()

  - ### Method Detail

    - #### cloneSolution

          protected Solution_ cloneSolution​(Solution_ originalSolution)

    - #### 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)

    - #### cloneArray

          protected Object cloneArray​(Class<?> expectedType,
                                      Object originalArray)

    - #### cloneCollection

          protected <E> Collection<E> cloneCollection​(Class<?> expectedType,
                                                      Collection<E> originalCollection)

    - #### constructCloneCollection

          protected <E> Collection<E> constructCloneCollection​(Collection<E> originalCollection)

    - #### cloneMap

          protected <K,​V> Map<K,​V> cloneMap​(Class<?> expectedType,
                                                        Map<K,​V> originalMap)

    - #### constructCloneMap

          protected <K,​V> Map<K,​V> constructCloneMap​(Map<K,​V> originalMap)

    - #### cloneCollectionsElementIfNeeded

          protected <C> C cloneCollectionsElementIfNeeded​(C original)

    - #### validateCloneSolution

          protected void validateCloneSolution​(Solution_ originalSolution,
                                               Solution_ cloneSolution)

      Fails fast if `FieldAccessingSolutionCloner.isFieldAnEntityPropertyOnSolution(java.lang.reflect.Field, java.lang.Class<?>)` assumptions were wrong.
      Parameters:
        `originalSolution` - never null
        `cloneSolution` - never null

    - #### getFieldValue

          protected Object getFieldValue​(Object bean,
                                         Field field)

    - #### setFieldValue

          protected void setFieldValue​(Object bean,
                                       Field field,
                                       Object value)