com.rubecula.darwin.domain.environment
Class PhenotypeFactory
java.lang.Object
com.rubecula.darwin.domain.environment.PhenotypeFactory
public final class PhenotypeFactory
- extends java.lang.Object
Factory Class to create Phenotype objects.
Applications can't change this class (it is final) but they can override the
methods which call these methods.
TODO fix up the other factory classes so that it works like this one.
TODO figure out a way to reference Phenotype_Dawkinsian directly without
violating any architectural issues.
- Author:
- Robin Hillyard
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getNextSequence
@Deprecated
public static int getNextSequence()
- Deprecated.
- This is only for the use of unit tests.
TODO by using pattern matching, avoid having to use this.
- Returns:
- the sequence
makeDawkinsian
public static Phenotype makeDawkinsian()
- Returns:
- a newly created
Phenotype_Dawkinsian
object.
makePhenotype
public static Phenotype makePhenotype(java.lang.Class<? extends Phenotype> clazz,
java.lang.Class<? extends java.lang.Object>[] parameterClasses,
java.lang.Object[] parameterValues)
- Parameters:
clazz
- the class of Phenotype to instantiate, which must have a
constructor of form Phenotype(EcoFactor,Object).parameterClasses
- XXXparameterValues
- XXX
- Returns:
- a newly constructed
Phenotype
.
makePhenotype
public static Phenotype makePhenotype(java.lang.String classname,
java.lang.Class<? extends java.lang.Object>[] parameterClasses,
java.lang.Object[] parameterValues)
- Parameters:
classname
- the fully qualified name of the Phenotype class requied.parameterClasses
- XXXparameterValues
- the parameters for the constructor
- Returns:
- a newly constructed
Phenotype
.
Copyright © 2010 Rubecula Software, LLC. All Rights Reserved.