Package repast.simphony.engine.schedule
Class DynamicTargetAction
- java.lang.Object
-
- repast.simphony.engine.schedule.DynamicTargetAction
-
-
Constructor Summary
Constructors Constructor Description DynamicTargetAction(Method method)
Creates a DynamicTargetAction from the specified tmethod.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
Calls the method named in the constructor on the target named in the constructor.String
getMethodName()
Object
getTarget()
void
setTarget(Object obj)
Sets the target of this action.
-
-
-
Constructor Detail
-
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 Detail
-
execute
public void execute()
Calls the method named in the constructor on the target named in the constructor.
-
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.
-
-