枚举工具类
通过Key获取枚举对象,方法不太公用,可以根据项目实际情况改造下
public class EnumsUtil {
public static<T> String getValue(final Class<T> c, Object code){
String value = null;
if(code==null){
return value;
}
T t = getEnum(c,code);
if(t==null){
return value;
原创
2021-08-31 17:45:37 ·
111 阅读 ·
0 评论