I have a utility method and when irrelevant logic is removed from it, the simplified method would look like this:
public static List<
This exception will be thrown only if clazz represents either an abstract class or an interface. Are you sure you're passing a Class object that represents a concrete class?