try {
newClass = codeModel._class(modifiers, element.getQualifiedName().toString(), classType);
} catch (JClassAlreadyExistsException ex) {
throw new CodeGenerationException(ex);
}
newClass.hide();
Annotator classAnnotator = new Annotator(newClass, environment);
classAnnotator.annotate(element.getAnnotationMirrors());
for (TypeParameterElement parameter: element.getTypeParameters()) {
JTypeVar typeVariable = newClass.generify(parameter.getSimpleName().toString());
environment.put(typeVariable.name(), typeVariable);