public static enum ErrorCode.CommonApiErrorCode extends Enum<ErrorCode.CommonApiErrorCode> implements ErrorCode
ErrorCode.CommonApiErrorCode, ErrorCode.UnknownErrorCode| 枚举常量和说明 |
|---|
BAD_REQUEST |
ERROR_CODE_FOR_UNKNOWN_ERROR| 限定符和类型 | 方法和说明 |
|---|---|
String |
code()
Represents the error code.
|
org.springframework.http.HttpStatus |
httpStatus()
The corresponding HTTP status for the given error code
|
static ErrorCode.CommonApiErrorCode |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static ErrorCode.CommonApiErrorCode[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final ErrorCode.CommonApiErrorCode BAD_REQUEST
public static ErrorCode.CommonApiErrorCode[] values()
for (ErrorCode.CommonApiErrorCode c : ErrorCode.CommonApiErrorCode.values()) System.out.println(c);
public static ErrorCode.CommonApiErrorCode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public org.springframework.http.HttpStatus httpStatus()
ErrorCodehttpStatus 在接口中 ErrorCodeCopyright © 2020. All rights reserved.