Solution_
- the solution type, the class with the PlanningSolution
annotationpublic class FieldAccessingSolutionCloner<Solution_> extends Object implements SolutionCloner<Solution_>
Modifier and Type | Class and Description |
---|---|
protected class |
FieldAccessingSolutionCloner.FieldAccessingSolutionClonerRun |
protected static class |
FieldAccessingSolutionCloner.Unprocessed |
Modifier and Type | Field and Description |
---|---|
protected ConcurrentMap<Class,Constructor> |
constructorCache |
protected ConcurrentMap<Class,Boolean> |
deepCloneDecisionActualValueClassCache |
protected ConcurrentMap<org.apache.commons.lang3.tuple.Pair<Field,Class>,Boolean> |
deepCloneDecisionFieldCache |
protected ConcurrentMap<Class,List<Field>> |
fieldListCache |
protected SolutionDescriptor<Solution_> |
solutionDescriptor |
Constructor and Description |
---|
FieldAccessingSolutionCloner(SolutionDescriptor<Solution_> solutionDescriptor) |
Modifier and Type | Method and Description |
---|---|
Solution_ |
cloneSolution(Solution_ originalSolution)
Does a planning clone.
|
protected boolean |
isClassDeepCloned(Class<?> type) |
protected boolean |
isFieldAnEntityOrSolution(Field field,
Class fieldInstanceClass) |
protected boolean |
isFieldAnEntityPropertyOnSolution(Field field,
Class fieldInstanceClass) |
protected <C> Constructor |
retrieveCachedConstructor(Class<C> clazz)
This method is thread-safe.
|
protected <C> List<Field> |
retrieveCachedFields(Class<C> clazz)
This method is thread-safe.
|
protected boolean |
retrieveDeepCloneDecision(Field field,
Class fieldInstanceClass,
Class<?> actualValueClass)
This method is thread-safe.
|
protected boolean |
retrieveDeepCloneDecisionForActualValueClass(Class<?> actualValueClass)
This method is thread-safe.
|
protected final SolutionDescriptor<Solution_> solutionDescriptor
protected final ConcurrentMap<Class,Constructor> constructorCache
protected final ConcurrentMap<Class,List<Field>> fieldListCache
protected final ConcurrentMap<org.apache.commons.lang3.tuple.Pair<Field,Class>,Boolean> deepCloneDecisionFieldCache
protected final ConcurrentMap<Class,Boolean> deepCloneDecisionActualValueClassCache
public FieldAccessingSolutionCloner(SolutionDescriptor<Solution_> solutionDescriptor)
public Solution_ cloneSolution(Solution_ originalSolution)
SolutionCloner
PlanningSolution
clone must fulfill these requirements:
original
.
PlanningSolution
,
the original PlanningSolution
must remain unchanged.This method is thread-safe.
cloneSolution
in interface SolutionCloner<Solution_>
originalSolution
- never null, the original PlanningSolution
PlanningSolution
protected <C> Constructor retrieveCachedConstructor(Class<C> clazz)
C
- typeclazz
- never nullprotected <C> List<Field> retrieveCachedFields(Class<C> clazz)
C
- typeclazz
- never nullprotected boolean retrieveDeepCloneDecision(Field field, Class fieldInstanceClass, Class<?> actualValueClass)
field
- never nullfieldInstanceClass
- never nullactualValueClass
- never nullprotected boolean isFieldAnEntityPropertyOnSolution(Field field, Class fieldInstanceClass)
protected boolean isFieldAnEntityOrSolution(Field field, Class fieldInstanceClass)
protected boolean retrieveDeepCloneDecisionForActualValueClass(Class<?> actualValueClass)
actualValueClass
- never nullprotected boolean isClassDeepCloned(Class<?> type)
Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.