当前位置: 首页>>代码示例>>Java>>正文


Java RootDoc.specifiedClasses方法代码示例

本文整理汇总了Java中com.sun.javadoc.RootDoc.specifiedClasses方法的典型用法代码示例。如果您正苦于以下问题:Java RootDoc.specifiedClasses方法的具体用法?Java RootDoc.specifiedClasses怎么用?Java RootDoc.specifiedClasses使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sun.javadoc.RootDoc的用法示例。


在下文中一共展示了RootDoc.specifiedClasses方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: test

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
void test(boolean withOption) {
    System.err.println("Testing " + (withOption ? "with" : "without") + " option");
    try {
        String dump = "";
        RootDoc root = getRootDoc(withOption);
        for (ClassDoc cd: root.specifiedClasses()) {
            dump += dump(cd);
        }
        if (dump.contains("lib.Lib2.i")) {
            if (!withOption) {
                error("control case failed: Lib2 class file was read, unexpectedly, without using option");
            }
        } else {
            if (withOption) {
                error("test case failed: could not read Lib2 class file, using option");
            }
        }
    } catch (ClosedFileSystemException e) {
        error("Unexpected exception: " + e);
    }
    System.err.println();
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:T8147801.java

示例2: test

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
void test(boolean withOption) {
    System.err.println("Testing " + (withOption ? "with" : "without") + " option");
    try {
        RootDoc root = getRootDoc(withOption);
        for (ClassDoc cd: root.specifiedClasses()) {
            dump("", cd);
        }
        if (!withOption) {
            error("expected option did not occur");
        }
    } catch (ClosedFileSystemException e) {
        if (withOption) {
            error("Unexpected exception: " + e);
        } else {
            System.err.println("Exception received as expected: " + e);
        }
    }
    System.err.println();
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:20,代码来源:T8147801.java

示例3: run

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private void run(RootDoc rootDoc)
{
   printHeader("Overview");

   printSubHeader("Specified Packages");

   PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();
   Arrays.sort(specifiedPackages);
   for (int i=0; i<specifiedPackages.length; ++i) {
      out.println(specifiedPackages[i].name());
   }

   printSubHeader("Specified Classes");

   ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();
   Arrays.sort(specifiedClasses);
   for (int i=0; i<specifiedClasses.length; ++i) {
      out.println(specifiedClasses[i].qualifiedTypeName());
   }
   printSubHeader("Classes");

   ClassDoc[] classes = rootDoc.classes();
   Arrays.sort(classes);
   for (int i=0; i<classes.length; ++i) {
      out.println(classes[i].qualifiedTypeName());
   }

   printHeader("Class Detail");

   for (int i=0; i<classes.length; ++i) {
      printSubHeader(classes[i].qualifiedTypeName());

      printTags(classes[i].firstSentenceTags());

      printSub2Header("Methods");

      MethodDoc[] methods = classes[i].methods();

      for (int j=0; j<methods.length; ++j) {
         out.println("name: \"" + methods[j].name() + "\"");
         out.println("signature: \"" + methods[j].signature() + "\"");
         out.println("modifiers: \"" + methods[j].modifiers() + "\"");
         out.print("throws: ");
         ClassDoc[] thrownExceptions = methods[j].thrownExceptions();
         for (int k=0; k<thrownExceptions.length; ++k) {
            if (k>0) { out.print(", "); }
            out.print(thrownExceptions[k].qualifiedTypeName());
         }
         out.println();
      }

      printSub2Header("Fields");

      FieldDoc[] fields = classes[i].fields();

      for (int j=0; j<fields.length; ++j) {
         out.println("name: \"" + fields[j].name() + "\"");
         out.println("modifiers: \"" + fields[j].modifiers() + "\"");
         out.println();
      }

      printSub2Header("Serializable Fields");

      FieldDoc[] sfields = classes[i].serializableFields();

      for (int j=0; j<sfields.length; ++j) {
         out.println("name: \"" + sfields[j].name() + "\"");
         out.println("modifiers: \"" + sfields[j].modifiers() + "\"");
         out.println();
      }
   }
}
 
开发者ID:vilie,项目名称:javify,代码行数:73,代码来源:DebugDoclet.java

示例4: run

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private void run(RootDoc rootDoc) 
{
   printHeader("Overview");

   printSubHeader("Specified Packages");

   PackageDoc[] specifiedPackages = rootDoc.specifiedPackages();
   Arrays.sort(specifiedPackages);
   for (int i=0; i<specifiedPackages.length; ++i) {
      out.println(specifiedPackages[i].name());
   }

   printSubHeader("Specified Classes");

   ClassDoc[] specifiedClasses = rootDoc.specifiedClasses();
   Arrays.sort(specifiedClasses);
   for (int i=0; i<specifiedClasses.length; ++i) {
      out.println(specifiedClasses[i].qualifiedTypeName());
   }
   printSubHeader("Classes");

   ClassDoc[] classes = rootDoc.classes();
   Arrays.sort(classes);
   for (int i=0; i<classes.length; ++i) {
      out.println(classes[i].qualifiedTypeName());
   }

   printHeader("Class Detail");

   for (int i=0; i<classes.length; ++i) {
      printSubHeader(classes[i].qualifiedTypeName());

      printTags(classes[i].firstSentenceTags());

      printSub2Header("Methods");

      MethodDoc[] methods = classes[i].methods();

      for (int j=0; j<methods.length; ++j) {
         out.println("name: \"" + methods[j].name() + "\"");
         out.println("signature: \"" + methods[j].signature() + "\"");
         out.println("modifiers: \"" + methods[j].modifiers() + "\"");
         out.print("throws: ");
         ClassDoc[] thrownExceptions = methods[j].thrownExceptions();
         for (int k=0; k<thrownExceptions.length; ++k) {
            if (k>0) { out.print(", "); }
            out.print(thrownExceptions[k].qualifiedTypeName());
         }
         out.println();
      }

      printSub2Header("Fields");

      FieldDoc[] fields = classes[i].fields();

      for (int j=0; j<fields.length; ++j) {
         out.println("name: \"" + fields[j].name() + "\"");
         out.println("modifiers: \"" + fields[j].modifiers() + "\"");
         out.println();
      }

      printSub2Header("Serializable Fields");

      FieldDoc[] sfields = classes[i].serializableFields();

      for (int j=0; j<sfields.length; ++j) {
         out.println("name: \"" + sfields[j].name() + "\"");
         out.println("modifiers: \"" + sfields[j].modifiers() + "\"");
         out.println();
      }
   }
}
 
开发者ID:nmldiegues,项目名称:jvm-stm,代码行数:73,代码来源:DebugDoclet.java


注:本文中的com.sun.javadoc.RootDoc.specifiedClasses方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。