private void start() { final ClassDoc[] classes = conf.parentConfiguration.root.classes(); for (final ClassDoc klass : classes) { if (Utils.findAnnotatedClass(klass, jpaAnnotations) != null) { handleJPAClass(klass); } } for (final JPAClass klass : jpaClasses) { klass.write(conf); } new PackageListWriter(conf, registry).write(); new SummaryWriter(conf, registry).write(); Utils.copyResources(conf); }
private void handleJPAClass(final ClassDoc klass) { ClassDoc superDoc = klass.superclass(); if (!registry.isJPAClass(klass.qualifiedTypeName()) && !klass.isPrimitive() && !klass.qualifiedTypeName().startsWith("java.") && !klass.isEnum()) { String fqName = klass.qualifiedTypeName(); JPAClass jpaClass = new JPAClass(klass, registry, this); jpaClasses.add(jpaClass); registry.addJPAClass(jpaClass); // load all used types List<JPAMember> members = jpaClass.getMembers(); for (JPAMember member : members) { Type type = member.getJavaType(); ClassDoc doc = type.asClassDoc(); if (doc != null && Utils.findAnnotatedClass(doc, jpaAnnotations) != null) { handleJPAClass(doc); } } } }