ai.setClassAnnotations(c.getAnnotations());
ai.setMainClass(c);
Class superClass = c;
Class rootClass = null;
while ((superClass = superClass.getSuperclass()) != null) {
MappedSuperclass mappedSuperclass = (MappedSuperclass) superClass.getAnnotation(MappedSuperclass.class);
Entity entity = (Entity) superClass.getAnnotation(Entity.class);
Inheritance inheritance = (Inheritance) superClass.getAnnotation(Inheritance.class);
if (mappedSuperclass != null || entity != null) {
putProperties(ai, superClass);
putMethods(ai, superClass);