The generated code provides full generic type information when creating instances of generic classes: ` private static final Set<Class<?>> RESOURCE_CLASSES = new HashSet<Class<?>>(); ` You can use the diamond operator instead.