public enum Code extends Enum<Code>
| 枚举常量和说明 |
|---|
ERROR
server error
|
LOGIN_FAILED
the custom error
|
SUCCESS
response success
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getCode()
Gets code.
|
static String |
getErrorMsg(String code)
Gets error msg.
|
String |
getMsg()
Gets msg.
|
void |
setCode(String code)
Sets code.
|
void |
setMsg(String msg)
Sets msg.
|
static Code |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static Code[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Code SUCCESS
public static final Code ERROR
public static final Code LOGIN_FAILED
public static Code[] values()
for (Code c : Code.values()) System.out.println(c);
public static Code valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public String getCode()
public void setCode(String code)
code - the codepublic String getMsg()
public void setMsg(String msg)
msg - the msgCopyright © 2022 Seata. All rights reserved.