//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.jkcredit.invoice.hub.enums.base;


import com.jkcredit.invoice.hub.spi.lang.exception.ServiceException;
import com.jkcredit.invoice.hub.util.EnumStatusUtils;

public interface EnumStatus extends IEnumStatus<Integer> {

    static EnumStatus getEnumStatus(Class<?> typeClass, int value) {
        EnumStatus status = EnumStatusUtils.getStatusByValue(typeClass, value);
        if (status == null) {
            throw new ServiceException("枚举值未定义, typeClass = " + typeClass.getCanonicalName() + ", Value = " + value);
        } else {
            return status;
        }
    }

}
