public class FieldAccessingSolutionCloner<Solution_ extends 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 Map<Class,Constructor> |
constructorCache |
protected Map<Class,Boolean> |
deepCloneDecisionActualValueClassCache |
protected Map<org.apache.commons.lang3.tuple.Pair<Field,Class>,Boolean> |
deepCloneDecisionFieldCache |
protected Map<Class,List<Field>> |
fieldListCache |
protected SolutionDescriptor |
solutionDescriptor |
Constructor and Description |
---|
FieldAccessingSolutionCloner(SolutionDescriptor 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<C> |
retrieveCachedConstructor(Class<C> clazz) |
protected <C> List<Field> |
retrieveCachedFields(Class<C> clazz) |
protected boolean |
retrieveDeepCloneDecision(Field field,
Class fieldInstanceClass,
Class<?> actualValueClass) |
protected boolean |
retrieveDeepCloneDecisionForActualValueClass(Class<?> actualValueClass) |
protected final SolutionDescriptor solutionDescriptor
protected final Map<Class,Constructor> constructorCache
protected final Map<org.apache.commons.lang3.tuple.Pair<Field,Class>,Boolean> deepCloneDecisionFieldCache
public FieldAccessingSolutionCloner(SolutionDescriptor solutionDescriptor)
public Solution_ cloneSolution(Solution_ originalSolution)
SolutionCloner
Solution
clone must fulfill these requirements:
original
.
Solution
,
the original Solution
must remain unchanged.cloneSolution
in interface SolutionCloner<Solution_ extends Solution>
originalSolution
- never null, the original Solution
Solution
protected <C> Constructor<C> retrieveCachedConstructor(Class<C> clazz) throws NoSuchMethodException
NoSuchMethodException
protected boolean retrieveDeepCloneDecision(Field field, Class fieldInstanceClass, Class<?> actualValueClass)
protected boolean isFieldAnEntityPropertyOnSolution(Field field, Class fieldInstanceClass)
protected boolean isFieldAnEntityOrSolution(Field field, Class fieldInstanceClass)
protected boolean retrieveDeepCloneDecisionForActualValueClass(Class<?> actualValueClass)
protected boolean isClassDeepCloned(Class<?> type)
Copyright © 2006–2016 JBoss by Red Hat. All rights reserved.