for (final EntityType<?> et : mm.getEntities()) {
// first, create a variable for the EntityType
String entityTypeVarName = generateErraiEntityType(et, cmm, globalEntityListeners);
MethodBodyCallback methodBodyCallback = new JpaMetamodelMethodBodyCallback(classBuilder, et);
// now, snapshot all the EntityType's attributes, adding them as we go
for (SingularAttribute<?, ?> attrib : et.getSingularAttributes()) {
Statement attribSnapshot = SnapshotMaker.makeSnapshotAsSubclass(
attrib, SingularAttribute.class, ErraiSingularAttribute.class, methodBodyCallback,