本文整理匯總了Java中com.sun.javadoc.RootDoc.printWarning方法的典型用法代碼示例。如果您正苦於以下問題:Java RootDoc.printWarning方法的具體用法?Java RootDoc.printWarning怎麽用?Java RootDoc.printWarning使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.sun.javadoc.RootDoc
的用法示例。
在下文中一共展示了RootDoc.printWarning方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: start
import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
public static boolean start(RootDoc root) {
// generate 150 warnings
for (int i = 1 ; i <= 150 ; i++) {
root.printWarning(WARNING_TEXT + i);
}
return true;
}
示例2: start
import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
public static boolean start(RootDoc root) {
// generate 10 errors or warnings
for (int i = 1 ; i <= 10 ; i++) {
if (genErrors)
root.printError(ERROR_MARKER + " " + i);
if (genWarnings)
root.printWarning(WARNING_MARKER + " " + i);
}
return true;
}
示例3: start
import com.sun.javadoc.RootDoc; //導入方法依賴的package包/類
/** Main doclet method. */
public static boolean start(RootDoc root) {
root.printWarning(null, docletWarning);
return true;
}
示例4: 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;
}