repast.simphony.scenario
Class ObjectActionLoader<T>

java.lang.Object
  extended by repast.simphony.scenario.AbstractActionLoader
      extended by repast.simphony.scenario.ObjectActionLoader<T>
All Implemented Interfaces:
ActionLoader
Direct Known Subclasses:
DefaultActionLoader, DescriptorActionLoader

public abstract class ObjectActionLoader<T>
extends AbstractActionLoader


Field Summary
protected  String actionRoot
           
protected  Class<T> dataClass
           
 
Fields inherited from class repast.simphony.scenario.AbstractActionLoader
contextID, file
 
Constructor Summary
ObjectActionLoader(File file, Object contextID, Class<T> dataClass, String actionRoot)
           
 
Method Summary
protected abstract  ControllerAction createAction(T data)
           
protected abstract  ClassLoader getClassLoader()
           
protected  void performLoad(Reader reader, com.thoughtworks.xstream.XStream xstream, Scenario scenario, ControllerRegistry registry)
           
protected  void prepare(com.thoughtworks.xstream.XStream xstream)
          Override this method if you need to prepare the XStream before using it.
 
Methods inherited from class repast.simphony.scenario.AbstractActionLoader
loadAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataClass

protected Class<T> dataClass

actionRoot

protected String actionRoot
Constructor Detail

ObjectActionLoader

public ObjectActionLoader(File file,
                          Object contextID,
                          Class<T> dataClass,
                          String actionRoot)
Method Detail

performLoad

protected void performLoad(Reader reader,
                           com.thoughtworks.xstream.XStream xstream,
                           Scenario scenario,
                           ControllerRegistry registry)
Specified by:
performLoad in class AbstractActionLoader

prepare

protected void prepare(com.thoughtworks.xstream.XStream xstream)
Override this method if you need to prepare the XStream before using it.

Parameters:
xstream - the XStream that will be used for reading in the descriptor

createAction

protected abstract ControllerAction createAction(T data)

getClassLoader

protected abstract ClassLoader getClassLoader()