Package mars.simulator
Enum Class SimulatorFinishEvent.Reason
- All Implemented Interfaces:
Serializable
,Comparable<SimulatorFinishEvent.Reason>
,Constable
- Enclosing class:
- SimulatorFinishEvent
Enumeration of reasons for why the simulator might finish or terminate.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn exception occurred, causing the program to terminate.One of the exit syscalls was invoked, causing the program to terminate.The program was terminated by something outside of the simulator.An unhandled internal error occurred during execution, causing the simulator thread to terminate prematurely.A null instruction was reached (the program counter ran off the bottom), causing the program to terminate. -
Method Summary
Modifier and TypeMethodDescriptionstatic SimulatorFinishEvent.Reason
Returns the enum constant of this class with the specified name.static SimulatorFinishEvent.Reason[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
EXCEPTION
An exception occurred, causing the program to terminate. -
EXIT_SYSCALL
One of the exit syscalls was invoked, causing the program to terminate. -
RAN_OFF_BOTTOM
A null instruction was reached (the program counter ran off the bottom), causing the program to terminate. -
INTERNAL_ERROR
An unhandled internal error occurred during execution, causing the simulator thread to terminate prematurely. -
EXTERNAL
The program was terminated by something outside of the simulator. This is usually caused by the Stop action.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-