public class ResponseWrapper<T> extends Object implements Serializable
| 构造器和说明 |
|---|
ResponseWrapper(boolean succ,
String msg,
T content) |
| 限定符和类型 | 方法和说明 |
|---|---|
ResponseWrapper<T> |
addOption(String key,
Object value) |
static ResponseWrapper |
fail() |
static <T> ResponseWrapper<T> |
fail(Exception e) |
static ResponseWrapper |
fail(String msg) |
static <T> ResponseWrapper<T> |
fail(String msg,
Exception e) |
Object |
getOption(String key) |
ResponseWrapper<T> |
setCode(String code) |
static ResponseWrapper |
success() |
static ResponseWrapper |
success(String msg) |
static <T> ResponseWrapper<T> |
success(T content) |
static <T> ResponseWrapper<T> |
success(T content,
String msg) |
public static ResponseWrapper success()
public static ResponseWrapper success(String msg)
public static <T> ResponseWrapper<T> success(T content)
public static <T> ResponseWrapper<T> success(T content, String msg)
public static ResponseWrapper fail()
public static ResponseWrapper fail(String msg)
public static <T> ResponseWrapper<T> fail(String msg, Exception e)
public static <T> ResponseWrapper<T> fail(Exception e)
public ResponseWrapper<T> addOption(String key, Object value)
public ResponseWrapper<T> setCode(String code)
Copyright © 2019. All rights reserved.