package net.educoder.ecsonar.enums;


/**
 * @Author: youys
 * @Date: 2022/12/20
 * @Description: 分析类型
 */
public enum AnalyseTypeEnum {

    CodeSmell(1),
    BUG(2),
    Vulnerability(3);

    private Integer type;


    AnalyseTypeEnum(Integer type) {
        this.type = type;
    }


    public Integer getType() {
        return type;
    }

    public static AnalyseTypeEnum getAnalyseTypeEnum(Integer type) {
        for (AnalyseTypeEnum analyseType : values()) {
            if (analyseType.type.equals(type)) {
                return analyseType;
            }
        }
        throw new RuntimeException("Not Found AnalyseTypeEnum by type=" + type);
    }

}
