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