<T extends BaseEnum>
public static <T extends BaseEnum> T valueOfCode(Class<T> clazz, Integer code) { if (code == null) { return null; } else { T[] enums = (BaseEnum[])clazz.getEnumConstants(); BaseEnum[] var3 = enums; int var4 = enums.length; for(int var5 = 0; var5 < var4; ++var5) { T anEnum = var3[var5]; if (anEnum.getCode() == code) { return anEnum; } } return null; } }