本文整理汇总了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;
}