Here you can find the source of valueOfIC(Class
public static <T extends Enum<T>> T valueOfIC(Class<T> enumType, String aName)
//package com.java2s; public class Main { /**//from ww w . j a v a2s. c o m * Returns an enum for enum class and string, ignoring case. */ public static <T extends Enum<T>> T valueOfIC(Class<T> enumType, String aName) { for (T value : enumType.getEnumConstants()) if (value.toString().equalsIgnoreCase(aName)) return value; if (aName == null) throw new NullPointerException("Name is null"); throw new IllegalArgumentException("No enum const " + enumType + "." + aName); } }