Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

feynman.framework.system
Class PhysicalSystemFactory  view PhysicalSystemFactory download PhysicalSystemFactory.java

java.lang.Object
  extended byfeynman.framework.system.PhysicalSystemFactory

public class PhysicalSystemFactory
extends java.lang.Object

Factory to create differenct types of PhysicalSystems.

Version:
$Revision: 1.1.1.1 $ $Date: 2002/11/12 02:25:43 $

Field Summary
private static PhysicalSystemFactory INSTANCE
           
 
Constructor Summary
private PhysicalSystemFactory()
           
 
Method Summary
static PhysicalSystem create(feynman.framework.simulation.Simulation simulation)
          Note: This method is used by the feynman.framework.Controller.
static PhysicalSystemFactory getInstance()
          Method used to retrieve an instance of the factory class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

private static final PhysicalSystemFactory INSTANCE
Constructor Detail

PhysicalSystemFactory

private PhysicalSystemFactory()
Method Detail

getInstance

public static final PhysicalSystemFactory getInstance()
Method used to retrieve an instance of the factory class.


create

public static PhysicalSystem create(feynman.framework.simulation.Simulation simulation)
                             throws PhysicalSystemFactoryException
Note: This method is used by the feynman.framework.Controller. Unless you are not using those classes to build your simulation, you should not have to use this factory class directly. If you do, then follow the instructions given below.

Use this method to create a PhysicalSystem of PhysicalObjects. The className is the name of the class to be instantiated for the type of physical system to be created. For example, if the client wants to to create a system included in the framework, then the following call to this factory will work:

 Simulation simulation = Marshaller.unmarshall("MyProps.properties");
 PhysicalSystemFactory sf = PhysicalSystemFactory.getInstance();
 PhysicalSystem ps = sf.create(simulation);