import com.pauware.pauware_engine._Core.AbstractAction; import com.pauware.pauware_engine._Core.AbstractGuard; import com.pauware.pauware_engine._Core.AbstractStatechart; import com.pauware.pauware_engine._Core.AbstractStatechart_monitor; import com.pauware.pauware_engine._Core.Observable; import com.pauware.pauware_engine._Core.Transition; import com.pauware.pauware_engine._Exception.Statechart_exception; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.logging.Level; import java.util.logging.Logger; /** * FileTrace write in a file the execution trace of a PauWare state machine * @author Lea, Eric */ public class FileTrace implements Observable { private final FileWriter fw; private AbstractStatechart_monitor stateMachine = null; private String writeTransition(Transition transition) { return "from "+transition.getFrom().getName()+" to "+transition.getTo().getName()+" for "+transition.getEvent(); } private String writeAction(AbstractAction action) { String val = action.getAction()+" on "+action.getObject().getClass().getName(); Object params[] = action.getArgs(); if (params != null) { val+= " with "; for (int i=0; i