OptaPlanner core 6.0.0.CR2

org.optaplanner.core.impl.domain.solution.cloner
Class FieldAccessingSolutionCloner<SolutionG extends Solution>

java.lang.Object
  extended by 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>


Nested Class Summary
protected  class FieldAccessingSolutionCloner.FieldAccessingSolutionClonerRun
           
protected static class FieldAccessingSolutionCloner.Unprocessed
           
 
Field Summary
protected  Map<Class,Constructor> constructorCache
           
protected  Map<Class,List<Field>> fieldListCache
           
protected  SolutionDescriptor solutionDescriptor
           
 
Constructor Summary
FieldAccessingSolutionCloner(SolutionDescriptor solutionDescriptor)
           
 
Method Summary
 SolutionG cloneSolution(SolutionG originalSolution)
          Does a planning clone.
protected
<C> Constructor<C>
retrieveCachedConstructor(Class<C> clazz)
           
protected
<C> List<Field>
retrieveCachedFields(Class<C> clazz)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

solutionDescriptor

protected final SolutionDescriptor solutionDescriptor

constructorCache

protected final Map<Class,Constructor> constructorCache

fieldListCache

protected final Map<Class,List<Field>> fieldListCache
Constructor Detail

FieldAccessingSolutionCloner

public FieldAccessingSolutionCloner(SolutionDescriptor solutionDescriptor)
Method Detail

cloneSolution

public SolutionG cloneSolution(SolutionG originalSolution)
Description copied from interface: SolutionCloner
Does a planning clone. The returned Solution clone must fulfill these requirements: 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)

OptaPlanner core 6.0.0.CR2

Copyright © 2006-2013 JBoss by Red Hat. All Rights Reserved.