pay模块批量添加缺失的javadoc文档

This commit is contained in:
Binary Wang
2018-09-23 22:05:06 +08:00
parent a41ebdc1aa
commit fbca4cdc59
40 changed files with 632 additions and 55 deletions

View File

@@ -51,11 +51,22 @@ public class WxPayException extends Exception {
*/
private String xmlString;
/**
* Instantiates a new Wx pay exception.
*
* @param customErrorMsg the custom error msg
*/
public WxPayException(String customErrorMsg) {
super(customErrorMsg);
this.customErrorMsg = customErrorMsg;
}
/**
* Instantiates a new Wx pay exception.
*
* @param customErrorMsg the custom error msg
* @param tr the tr
*/
public WxPayException(String customErrorMsg, Throwable tr) {
super(customErrorMsg, tr);
this.customErrorMsg = customErrorMsg;
@@ -73,6 +84,9 @@ public class WxPayException extends Exception {
/**
* 通过BaseWxPayResult生成异常对象.
*
* @param payBaseResult the pay base result
* @return the wx pay exception
*/
public static WxPayException from(BaseWxPayResult payBaseResult) {
return WxPayException.newBuilder()
@@ -85,10 +99,18 @@ public class WxPayException extends Exception {
.build();
}
/**
* New builder builder.
*
* @return the builder
*/
public static Builder newBuilder() {
return new Builder();
}
/**
* The type Builder.
*/
public static final class Builder {
private String returnCode;
private String returnMsg;
@@ -100,40 +122,86 @@ public class WxPayException extends Exception {
private Builder() {
}
/**
* Return code builder.
*
* @param returnCode the return code
* @return the builder
*/
public Builder returnCode(String returnCode) {
this.returnCode = returnCode;
return this;
}
/**
* Return msg builder.
*
* @param returnMsg the return msg
* @return the builder
*/
public Builder returnMsg(String returnMsg) {
this.returnMsg = returnMsg;
return this;
}
/**
* Result code builder.
*
* @param resultCode the result code
* @return the builder
*/
public Builder resultCode(String resultCode) {
this.resultCode = resultCode;
return this;
}
/**
* Err code builder.
*
* @param errCode the err code
* @return the builder
*/
public Builder errCode(String errCode) {
this.errCode = errCode;
return this;
}
/**
* Err code des builder.
*
* @param errCodeDes the err code des
* @return the builder
*/
public Builder errCodeDes(String errCodeDes) {
this.errCodeDes = errCodeDes;
return this;
}
/**
* Xml string builder.
*
* @param xmlString the xml string
* @return the builder
*/
public Builder xmlString(String xmlString) {
this.xmlString = xmlString;
return this;
}
/**
* Build wx pay exception.
*
* @return the wx pay exception
*/
public WxPayException build() {
return new WxPayException(this);
}
/**
* Build error msg string.
*
* @return the string
*/
public String buildErrorMsg() {
return Joiner.on("").skipNulls().join(
returnCode == null ? null : String.format("返回代码:[%s]", returnCode),