package com.ruoyi.project.business.enums;


import com.ruoyi.common.exception.ServiceErrorException;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author jubs
 */

@AllArgsConstructor
@Getter
public enum JEPSplitEnum {

    /**
     * 方法标识位
     */
    FUNC_SPLIT_FLAG("$@$"),
    /**
     * 变量标识位
     */
    PARAM_SPLIT_FLAG("$_$"),
    /**
     * 逻辑位标识符号
     * */
    LOGIC_SPLIT_FLAG("$__$"),;


    private final String funcKey;

    public static JEPSplitEnum fromByKey(String key) {
        for (JEPSplitEnum auditFlowEnum : values()) {
            if (auditFlowEnum.getFuncKey().equals(key)) {
                return auditFlowEnum;
            }
        }

        throw new ServiceErrorException("非法的标识位");
    }

}
