public enum CommonErrorCode extends Enum<CommonErrorCode> implements ErrorCode
| Enum Constant and Description |
|---|
CONNECTION_ERROR |
HTTP_RESPONSE_ERROR |
UNEXPECTED_ERROR |
| Modifier and Type | Method and Description |
|---|---|
static ErrorCode |
findByStatusCode(String statusCode) |
Integer |
getDescriptionResId() |
String |
getStatusCode() |
Integer |
getTitleResId() |
ErrorCodeException |
newErrorCodeException() |
ErrorCodeException |
newErrorCodeException(Object... errorCodeParameters) |
ErrorCodeException |
newErrorCodeException(String message) |
ErrorCodeException |
newErrorCodeException(Throwable throwable) |
static CommonErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static CommonErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final CommonErrorCode CONNECTION_ERROR
public static final CommonErrorCode UNEXPECTED_ERROR
public static final CommonErrorCode HTTP_RESPONSE_ERROR
public static CommonErrorCode[] values()
for (CommonErrorCode c : CommonErrorCode.values()) System.out.println(c);
public static CommonErrorCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic String getStatusCode()
getStatusCode in interface ErrorCodeErrorCode.getStatusCode()public Integer getTitleResId()
getTitleResId in interface ErrorCodeErrorCode.getTitleResId()public Integer getDescriptionResId()
getDescriptionResId in interface ErrorCodeErrorCode.getDescriptionResId()public ErrorCodeException newErrorCodeException(Object... errorCodeParameters)
newErrorCodeException in interface ErrorCodeerrorCodeParameters - The parameters for this ErrorCode's message.ErrorCodeException with this ErrorCodeErrorCode.newErrorCodeException(java.lang.Object[])public ErrorCodeException newErrorCodeException()
newErrorCodeException in interface ErrorCodeErrorCodeExceptionErrorCode.newErrorCodeException()public ErrorCodeException newErrorCodeException(Throwable throwable)
newErrorCodeException in interface ErrorCodeErrorCode.newErrorCodeException(java.lang.Throwable)public ErrorCodeException newErrorCodeException(String message)
newErrorCodeException in interface ErrorCodemessage - The messageErrorCodeExceptionErrorCode.newErrorCodeException(java.lang.String)Copyright © 2014. All rights reserved.