當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。