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