public class ErrorDescriptor extends AbstractDescriptor
Descriptor
for errors/exceptions (any kind of Throwable
).Modifier and Type | Class and Description |
---|---|
static class |
ErrorDescriptor.Match
Mode to match
error name . |
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_JSON_EXAMPLE
Default for
getJsonExample() . |
static String |
DEFAULT_XML_EXAMPLE
Default for
getXmlExample() . |
HTTP_METHOD_DELETE, HTTP_METHOD_GET, HTTP_METHOD_HEAD, HTTP_METHOD_OPTIONS, HTTP_METHOD_PATCH, HTTP_METHOD_POST, HTTP_METHOD_PUT, LOCATION_BODY, LOCATION_COOKIE, LOCATION_FORM_DATA, LOCATION_HEADER, LOCATION_PATH, LOCATION_QUERY, SCHEME_HTTP, SCHEME_HTTPS, SCHEME_WS, SCHEME_WSS, STATUS_CODE_BAD_REQUEST, STATUS_CODE_CONFLICT, STATUS_CODE_FORBIDDEN, STATUS_CODE_INTERNAL_SERVER_ERROR, STATUS_CODE_NO_CONTENT, STATUS_CODE_SUCCESS, STATUS_CODE_UNAUTHORIZED
Constructor and Description |
---|
ErrorDescriptor() |
Modifier and Type | Method and Description |
---|---|
String |
getComment() |
Class<?> |
getErrorClass() |
String |
getErrorName() |
Pattern |
getErrorNamePattern() |
String |
getJsonExample() |
ErrorDescriptor.Match |
getMatch() |
String |
getStatusCode() |
String |
getXmlExample() |
void |
setComment(String comment) |
void |
setErrorClass(Class<?> errorClass) |
void |
setErrorName(String errorNameRegex) |
void |
setJsonExample(String jsonExample) |
void |
setMatch(ErrorDescriptor.Match match) |
void |
setStatusCode(String statusCode) |
void |
setXmlExample(String xmlExample) |
String |
toString() |
notNull
public static final String DEFAULT_JSON_EXAMPLE
getJsonExample()
.public static final String DEFAULT_XML_EXAMPLE
getXmlExample()
.public String getErrorName()
public void setErrorName(String errorNameRegex)
errorNameRegex
- is the errorNameRegex to setpublic String getJsonExample()
public void setJsonExample(String jsonExample)
jsonExample
- is the jsonExample to setpublic String getXmlExample()
public void setXmlExample(String xmlExample)
xmlExample
- is the xmlExample to setpublic String getStatusCode()
public void setStatusCode(String statusCode)
statusCode
- is the statusCode to setpublic String getComment()
ErrorDescriptor.Match.always
).public void setComment(String comment)
comment
- is the comment to setpublic Pattern getErrorNamePattern()
public ErrorDescriptor.Match getMatch()
public void setMatch(ErrorDescriptor.Match match)
match
- is the match to setpublic Class<?> getErrorClass()
public void setErrorClass(Class<?> errorClass)
errorClass
- is the errorClass to setCopyright © 2015–2021 MojoHaus. All rights reserved.