枚举 ResponseCode
- java.lang.Object
-
- java.lang.Enum<ResponseCode>
-
- com.alibaba.nacos.api.remote.response.ResponseCode
-
- 所有已实现的接口:
java.io.Serializable,java.lang.Comparable<ResponseCode>
public enum ResponseCode extends java.lang.Enum<ResponseCode>
ResponseCode.- 版本:
- $Id: ResponseCode.java, v 0.1 2020年07月14日 2:04 PM liuzunfei Exp $
- 作者:
- liuzunfei
-
-
构造器概要
构造器 限定符 构造器 说明 privateResponseCode(int code, java.lang.String desc)
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 intgetCode()Getter method for property code.java.lang.StringgetDesc()Getter method for property desc.voidsetCode(int code)Setter method for property code.voidsetDesc(java.lang.String desc)Setter method for property desc.static ResponseCodevalueOf(java.lang.String name)返回带有指定名称的该类型的枚举常量。static ResponseCode[]values()按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。
-
-
-
枚举常量详细资料
-
SUCCESS
public static final ResponseCode SUCCESS
Request success.
-
FAIL
public static final ResponseCode FAIL
Request failed.
-
-
方法详细资料
-
values
public static ResponseCode[] values()
按照声明该枚举类型的常量的顺序, 返回 包含这些常量的数组。该方法可用于迭代 常量, 如下所示:for (ResponseCode c : ResponseCode.values()) System.out.println(c);
- 返回:
- 按照声明该枚举类型的常量的顺序返回的包含这些常量的数组
-
valueOf
public static ResponseCode valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。 字符串必须与用于声明该类型的枚举常量的 标识符完全匹配。(不允许有多余 的空格字符。)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
java.lang.IllegalArgumentException- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException- 如果参数为空值
-
getCode
public int getCode()
Getter method for property code.- 返回:
- property value of code
-
setCode
public void setCode(int code)
Setter method for property code.- 参数:
code- value to be assigned to property code
-
getDesc
public java.lang.String getDesc()
Getter method for property desc.- 返回:
- property value of desc
-
setDesc
public void setDesc(java.lang.String desc)
Setter method for property desc.- 参数:
desc- value to be assigned to property desc
-
-