org.optaplanner.core.impl.domain.solution.cloner
Class FieldAccessingSolutionCloner<SolutionG extends Solution>
java.lang.Object
  
org.optaplanner.core.impl.domain.solution.cloner.FieldAccessingSolutionCloner<SolutionG>
- All Implemented Interfaces: 
 - SolutionCloner<SolutionG>
 
public class FieldAccessingSolutionCloner<SolutionG extends Solution>
- extends Object
- implements SolutionCloner<SolutionG>
  
 
 
 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
solutionDescriptor
protected final SolutionDescriptor solutionDescriptor
constructorCache
protected final Map<Class,Constructor> constructorCache
fieldListCache
protected final Map<Class,List<Field>> fieldListCache
deepCloneDecisionFieldCache
protected final Map<Field,Boolean> deepCloneDecisionFieldCache
deepCloneDecisionActualValueClassCache
protected final Map<Class,Boolean> deepCloneDecisionActualValueClassCache
FieldAccessingSolutionCloner
public FieldAccessingSolutionCloner(SolutionDescriptor solutionDescriptor)
cloneSolution
public SolutionG cloneSolution(SolutionG originalSolution)
- Description copied from interface: 
SolutionCloner 
- Does a planning clone. The returned 
Solution clone must fulfill these requirements:
 
 - The clone must represent the same planning problem.
 Usually it reuses the same instances of the problem facts and problem fact collections as the 
original.
  
 - The clone must use different, cloned instances of the entities and entity collections.
 If a cloned entity changes, the original must remain unchanged.
 If an entity is added or removed in a cloned 
Solution,
 the original Solution must remain unchanged. 
 
 Note that a class might support more than 1 clone method: planning clone is just one of them.
- Specified by:
 cloneSolution in interface SolutionCloner<SolutionG extends Solution>
 
- Parameters:
 originalSolution - never null, the original Solution
- Returns:
 - never null, the cloned 
Solution 
 
 
retrieveCachedConstructor
protected <C> Constructor<C> retrieveCachedConstructor(Class<C> clazz)
                                            throws NoSuchMethodException
 
- Throws:
 NoSuchMethodException
 
retrieveCachedFields
protected <C> List<Field> retrieveCachedFields(Class<C> clazz)
 
 
retrieveDeepCloneDecision
protected boolean retrieveDeepCloneDecision(Field field,
                                            Class<?> actualValueClass)
 
 
isFieldAnEntityPropertyOnSolution
protected boolean isFieldAnEntityPropertyOnSolution(Field field)
 
 
isFieldAnEntityOrSolution
protected boolean isFieldAnEntityOrSolution(Field field)
 
 
retrieveDeepCloneDecisionForActualValueClass
protected boolean retrieveDeepCloneDecisionForActualValueClass(Class<?> actualValueClass)
 
 
isClassDeepCloned
protected boolean isClassDeepCloned(Class<?> type)
 
 
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.