Class DynamicTargetAction

java.lang.Object
repast.simphony.engine.schedule.DynamicTargetAction
All Implemented Interfaces:
IAction

public class DynamicTargetAction extends Object implements IAction
An IAction created from a Method. The target of the method can be changed.
Version:
$Revision: 1.1 $ $Date: 2005/12/21 22:25:34 $
Author:
Nick Collier
  • Constructor Details

    • DynamicTargetAction

      public DynamicTargetAction(Method method)
      Creates a DynamicTargetAction from the specified tmethod. When executed, the DynamicAction will call the the method on whatever the current target is.
      Parameters:
      method - the method to call
  • Method Details

    • execute

      public void execute()
      Calls the method named in the constructor on the target named in the constructor.
      Specified by:
      execute in interface IAction
    • getMethodName

      public String getMethodName()
      Returns:
      the name of the method to be called on the target object.
    • setTarget

      public void setTarget(Object obj)
      Sets the target of this action.
      Parameters:
      obj - the target
    • getTarget

      public Object getTarget()
      Returns:
      the target object whose method will be called in the execution of this action.