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


Java RootDoc.printNotice方法代码示例

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


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

示例1: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) {
    root.printNotice("Parsing Java code");
    final Document document = new JavadocToDocumentConverter(root, title, properties).createDocument();
    root.printNotice("Generating Markdown output to " + outputFile);
    final String error = new DocumentToMarkdownWriter(createOutputWriter()).writeDocument(document);
    final boolean result = (error == null);
    if (error != null) {
        root.printError(error);
    }
    // Because we're mucking around with static fields, we must ensure we reset them too. Yuck.
    title = null;
    properties = null;
    outputFile = null;
    root.printNotice("Done!");
    return result;
}
 
开发者ID:voostindie,项目名称:markdoclet,代码行数:17,代码来源:Markdoclet.java

示例2: printClassMembers

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
static void printClassMembers(RootDoc root, ClassDoc cls) {
    root.printNotice("Members for: " + cls);
    root.printNotice("  extends " + Arrays.asList(cls.superclass()));
    root.printNotice("  Fields: ");
    printMembers(root, cls.fields());
    root.printNotice("  Constructor: ");
    printMembers(root, cls.constructors());
    root.printNotice("  Method: ");
    printMembers(root, cls.methods());
    if (cls.superclass() != null && !cls.superclassType().toString().equals("java.lang.Object"))
        printClassMembers(root, cls.superclass());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:13,代码来源:ToyDoclet.java

示例3: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
/**
 * The entry point for the doclet
 */
public static boolean start(RootDoc root) {
  String[][] options = root.options();

  File outputFile = null;
  for (int i = 0; i < options.length; i++) {
    String[] option = options[i];
    if (option[0].equals("-output")) {
      outputFile = new File(option[1]);
    }
  }

  if (outputFile == null) {
    root.printError("Internal Error: No output file");
    return false;

  } else {
    root.printNotice("Generating " + outputFile);
  }

  try {
    PrintWriter pw = new PrintWriter(new FileWriter(outputFile));
    Formatter.center("GemFire Unit Test Summary", pw);
    Formatter.center(new Date().toString(), pw);
    pw.println("");

    ClassDoc[] classes = root.classes();
    Arrays.sort(classes, new Comparator() {
      public int compare(Object o1, Object o2) {
        ClassDoc c1 = (ClassDoc) o1;
        ClassDoc c2 = (ClassDoc) o2;
        return c1.qualifiedName().compareTo(c2.qualifiedName());
      }
    });
    for (int i = 0; i < classes.length; i++) {
      ClassDoc c = classes[i];
      if (!c.isAbstract() && isUnitTest(c)) {
        document(c, pw);
      }
    }

    pw.flush();
    pw.close();

  } catch (IOException ex) {
    StringWriter sw = new StringWriter();
    ex.printStackTrace(new PrintWriter(sw, true));
    root.printError(sw.toString());
    return false;
  }

  return true;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:56,代码来源:UnitTestDoclet.java

示例4: start

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
public static boolean start(RootDoc root) {
    root.printNotice("Notice: " + "This is not the Standard Doclet");
    return true;
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:5,代码来源:Standard.java

示例5: printMembers

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
static void printMembers(RootDoc root, ProgramElementDoc[] pgmDocs) {
    for (ProgramElementDoc pgmDoc : pgmDocs) {
        root.printNotice("     " + pgmDoc + ", Comments: " + pgmDoc.getRawCommentText());
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:6,代码来源:ToyDoclet.java

示例6: getHome

import com.sun.javadoc.RootDoc; //导入方法依赖的package包/类
private static File getHome(RootDoc root) {
    if (homeDetermined) {
        return home;
    }

    File graphvizDir = null;
    try {
        String graphvizHome = System.getProperty("graphviz.home");
        if (graphvizHome != null) {
            root.printNotice(
                    "Using the 'graphviz.home' system property: " +
                    graphvizHome);
        } else {
            root.printNotice(
                    "The 'graphviz.home' system property was not specified.");

            graphvizHome = System.getenv("GRAPHVIZ_HOME");
            if (graphvizHome != null) {
                root.printNotice(
                        "Using the 'GRAPHVIZ_HOME' environment variable: " +
                        graphvizHome);
            } else {
                root.printNotice(
                        "The 'GRAPHVIZ_HOME' environment variable was not specified.");
            }
        }
        if (graphvizHome != null) {
            graphvizDir = new File(graphvizHome);
            if (!graphvizDir.exists() || !graphvizDir.isDirectory()) {
                root.printWarning(
                        "The specified graphviz home directory does not exist: " +
                        graphvizDir.getPath());
                graphvizDir = null;
            }
        }

        if (graphvizDir == null) {
            root.printNotice(
                    "System path will be used as graphviz home directory was not specified.");
        }
    } catch (Exception e) {
        // ignore...
    }
    homeDetermined = true;
    return home = graphvizDir;
}
 
开发者ID:grahamedgecombe,项目名称:apiviz,代码行数:47,代码来源:Graphviz.java


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