// Path: xDoc-core/src/main/java/org/treeleafj/xdoc/utils/Constant.java
// public class Constant {
// 
//     public static final String NOT_EN = "N";
//     public static final String NOT_ZH = "非必填";
//     public static final String YES_EN = "Y";
//     public static final String YES_ZH = "必填";
// 
// }


import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.treeleafj.xdoc.utils.Constant;
package org.treeleafj.xdoc.tag;


/**
 * 针对@Resp注释的内容封装
 *
 * Created by leaf on 2017/3/12 0012.
 */
@Data
public class RespTagImpl extends DocTag<String> {

    /**
     * 参数名
     */
    private String paramName;

    /**
     * 参数描述
     */
    private String paramDesc;

    /**
     * 是否必填,默认false
     */
    private boolean require;

    /**
     * 类型
     */
    private String paramType;

    public RespTagImpl(String tagName, String paramName, String paramDesc, String paramType, boolean require) {
        super(tagName);
        this.paramName = paramName;
        this.paramDesc = paramDesc;
        this.paramType = paramType;
        this.require = require;
    }

    @Override
    public String getValues() {
        String s = paramName + " " + paramDesc;
        if (StringUtils.isNotBlank(paramType)) {
            s += " " + paramType;
        }
// Path: xDoc-core/src/main/java/org/treeleafj/xdoc/utils/Constant.java
// public class Constant {
// 
//     public static final String NOT_EN = "N";
//     public static final String NOT_ZH = "非必填";
//     public static final String YES_EN = "Y";
//     public static final String YES_ZH = "必填";
// 
// }


// Path: xDoc-core/src/main/java/org/treeleafj/xdoc/tag/RespTagImpl.java
import lombok.Data;
import org.apache.commons.lang3.StringUtils;
import org.treeleafj.xdoc.utils.Constant;

package org.treeleafj.xdoc.tag;


/**
 * 针对@Resp注释的内容封装
 *
 * Created by leaf on 2017/3/12 0012.
 */
@Data
public class RespTagImpl extends DocTag<String> {

    /**
     * 参数名
     */
    private String paramName;

    /**
     * 参数描述
     */
    private String paramDesc;

    /**
     * 是否必填,默认false
     */
    private boolean require;

    /**
     * 类型
     */
    private String paramType;

    public RespTagImpl(String tagName, String paramName, String paramDesc, String paramType, boolean require) {
        super(tagName);
        this.paramName = paramName;
        this.paramDesc = paramDesc;
        this.paramType = paramType;
        this.require = require;
    }

    @Override
    public String getValues() {
        String s = paramName + " " + paramDesc;
        if (StringUtils.isNotBlank(paramType)) {
            s += " " + paramType;
        }
        s += " " + (require ? Constant.YES_ZH : Constant.NOT_ZH);