refactor: 重构枚举类并统一模式定义
- 新增 Mode 枚举类,用于统一定义程序的运行和调试模式- 删除 VMMode 枚举类,使用新的 Mode 枚举替代 - 通过重构简化代码结构,提高代码可维护性
This commit is contained in:
parent
1605390f08
commit
0dbe39eff3
20
src/main/java/org/jcnc/snow/common/Mode.java
Normal file
20
src/main/java/org/jcnc/snow/common/Mode.java
Normal file
@ -0,0 +1,20 @@
|
||||
package org.jcnc.snow.common;
|
||||
|
||||
/**
|
||||
* 程序的运行/调试模式枚举。
|
||||
* <ul>
|
||||
* <li>RUN:运行模式</li>
|
||||
* <li>DEBUG:调试模式</li>
|
||||
* </ul>
|
||||
*/
|
||||
public enum Mode {
|
||||
/**
|
||||
* 运行模式。
|
||||
*/
|
||||
RUN,
|
||||
|
||||
/**
|
||||
* 调试模式。
|
||||
*/
|
||||
DEBUG
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
package org.jcnc.snow.vm.engine;
|
||||
|
||||
/**
|
||||
* The VMMode enum defines the different operational modes of the virtual machine.
|
||||
* <p>This class is used to distinguish the behavior of the virtual machine in different states, with each mode corresponding to a different operational logic.</p>
|
||||
*/
|
||||
public enum VMMode {
|
||||
/**
|
||||
* Run Mode: The virtual machine executes instructions in the normal execution flow.
|
||||
* <p>In this mode, the virtual machine processes instructions and performs related calculations.</p>
|
||||
*/
|
||||
RUN,
|
||||
|
||||
/**
|
||||
* Debug Mode: The virtual machine outputs debug information during execution.
|
||||
* <p>This mode is used for debugging the virtual machine, allowing developers to view detailed information such as the execution state, local variables, and more.</p>
|
||||
*/
|
||||
DEBUG,
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user