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); } } } }
public static String classToRoot(JPAClass klass) { return DirectoryManager.getRelativePath(klass.getPackageName()); }
public static String urlToClass(JPAClass from, JPAClass to) { return classToRoot(from) + classToPath(to) + "/" + to.getShortClassName() + ".html"; }
public static String classToPath(JPAClass jpaClass) { return DirectoryManager.getPath(jpaClass.getPackageName()); }