class LangUtils {

	public static <T> T strCastTo(String str, Class<T> toType){
		if(List.class.isAssignableFrom(toType)){
			return (T)Types.asList(str, String.class);
		}else if(toType.isArray()){
			return (T)Types.asArray(str, String.class);
		}else{
			return Types.convertValue(str, toType);
		}
	}

}