me.ruebner.jvisualizer.backend.events.DebugFinishedEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jvisualizer Show documentation
Show all versions of jvisualizer Show documentation
This project aims to provide an easy tool to visualize data flow and objects within the JVM. It is intended for
students that are starting to learn programming with Java.
The newest version!
package me.ruebner.jvisualizer.backend.events;
import me.ruebner.jvisualizer.backend.vm.structure.DebugState;
/**
* A {@link DebugEvent} that is fired when the debugging has finished. This can be caused by an error or the end of the
* visualizee's execution.
*/
public class DebugFinishedEvent extends DebugEvent {
/**
* the state when the visualization was finished
*/
private final DebugState debugState;
/**
* Creates a new event signalling the end of visualization.
* @param source the object that fired the event, usually the {@link me.ruebner.jvisualizer.backend.Backend}
*/
public DebugFinishedEvent(Object source) {
super(source);
debugState = DebugState.createFinishedState();
}
/**
* The current state of the visualizee. This returns an empty DebugState object, because execution has finished.
* @return the current state of the visualizee
*/
@Override
public DebugState getDebugState() {
return debugState;
}
}