本文整理汇总了Java中com.sun.tools.doclets.standard.Standard类的典型用法代码示例。如果您正苦于以下问题:Java Standard类的具体用法?Java Standard怎么用?Java Standard使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Standard类属于com.sun.tools.doclets.standard包,在下文中一共展示了Standard类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: validOptions
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
/** Specified for the Doclet API */
public static boolean validOptions(
String[][] options,
DocErrorReporter reporter) {
ImmutableList.Builder<String[]> optionsForStandardDoclet
= ImmutableList.builder();
boolean ok = true;
for (String[] optionArr : options) {
OptionName on = OPTION_NAMES.get(optionArr[0]);
if (on == null) {
optionsForStandardDoclet.add(optionArr);
} else {
ok &= on.isValid(optionArr, reporter);
}
}
ok &= Standard.validOptions(
optionsForStandardDoclet.build().toArray(new String[0][]), reporter);
return ok;
}
示例2: optionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static int optionLength(String option) {
Integer length = StabilityOptions.optionLength(option);
if (length != null) {
return length;
}
return Standard.optionLength(option);
}
示例3: start
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static boolean start(RootDoc rootDoc) {
UMLDoclet umlDoclet = new UMLDoclet(rootDoc);
boolean umlDocletResult = umlDoclet.generateUMLDiagrams();
// Regarding issue #13: I don't understand why the Standard doclet will run on a 'bad' javadoc
// contained in RootDoc somewhere after UMLDoclet has done it's thing, but
// send us a (correct) JavaDoc ERROR if ran on the same rootDoc 'untouched'...
// Think about this; Is there some way to 'clone' it and pass the original rootDoc to the
// Standard doclet??
// TODO re-test this issue with the added 'languageVersion()' method.
if (umlDocletResult && !umlDoclet.config.skipStandardDoclet()) {
return Standard.start(rootDoc);
}
return umlDocletResult;
}
示例4: optionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
/**
* Get the number of arguments that a given option expects from the command line. This number includes the option
* itself: for example '-d /output/javadoc' should return 2.
*
* @param optionFlag the option to parse
* @return the number of arguments it expects from the command line
*/
public static int optionLength(String optionFlag) {
for (OrchidFlag option : OrchidFlags.getInstance().getFlags()) {
if (optionFlag.equals("-" + option.getFlag())) {
return option.optionLength();
}
}
return Standard.optionLength(optionFlag);
}
示例5: optionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
/**
* Option check, forwards options to the standard doclet,
* if that one refuses them, they are used by this doclet.
*/
public static int optionLength(String option) {
// Workaround http://stackoverflow.com/questions/19181236 courtesy
// UmlGraphDoc.
int result = Standard.optionLength(option);
if (result != 0) {
return result;
} else {
// Ones we want.
if (OPTION_NAMES.containsKey(option)) { return 2; }
return 0;
}
}
示例6: start
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static boolean start(RootDoc root) {
root = new APIvizRootDoc(root);
if (!Standard.start(root)) {
return false;
}
if (!Graphviz.isAvailable(root)) {
root.printWarning("Graphviz is not found.");
root.printWarning("Please install graphviz and specify -Dgraphviz.home Otherwise, you might have specified incorrect graphviz home Graphviz is not found in the system path.");
root.printWarning("Skipping diagram generation.");
return true;
}
try {
File outputDirectory = getOutputDirectory(root.options());
ClassDocGraph graph = new ClassDocGraph(root);
if (shouldGeneratePackageDiagram(root.options())) {
generateOverviewSummary(root, graph, outputDirectory);
}
generatePackageSummaries(root, graph, outputDirectory);
generateClassDiagrams(root, graph, outputDirectory);
} catch(Throwable t) {
root.printError(
"An error occurred during diagram generation: " +
t.toString());
t.printStackTrace();
return false;
}
return true;
}
示例7: optionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static int optionLength(String option) {
if (OPTION_CATEGORY.equals(option)) {
return 2;
}
if (OPTION_SOURCE_CLASS_PATH.equals(option)) {
return 2;
}
if (OPTION_NO_PACKAGE_DIAGRAM.equals(option)) {
return 1;
}
int answer = Standard.optionLength(option);
if (option.equals(OPTION_HELP)) {
// Print the options provided by APIviz.
System.out.println();
System.out.println("Provided by APIviz doclet:");
System.out.println(OPTION_SOURCE_CLASS_PATH + " <pathlist> Specify where to find source class files");
System.out.println(OPTION_NO_PACKAGE_DIAGRAM + " Do not generate the package diagram in the overview summary");
System.out.println(OPTION_CATEGORY + " <category>[:<fillcolor>[:<linecolor>]] ");
System.out.println(" Color for items marked with " + TAG_CATEGORY);
}
return answer;
}
示例8: optionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static int optionLength(String option) {
if (option.equals("-resource-info")) {
return 2;
} else {
return Standard.optionLength(option);
}
}
示例9: testOptionLength
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
@Test
public void testOptionLength() throws Exception {
String options = "options";
int optionsLength = 42;
PowerMockito.when(Standard.class, "optionLength", options).thenReturn(optionsLength);
assertEquals(optionsLength, adapter.optionLength(options));
PowerMockito.verifyStatic();
Standard.optionLength(options);
}
示例10: testStart
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
@Test
public void testStart() throws Exception {
RootDoc mockDoc = mock(RootDoc.class);
PowerMockito.when(Standard.class, "start", mockDoc).thenReturn(true);
assertTrue(adapter.start(mockDoc));
PowerMockito.verifyStatic();
Standard.start(mockDoc);
}
示例11: testValidOptions
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
@Test
public void testValidOptions() throws Exception {
DocErrorReporter mockReporter = mock(DocErrorReporter.class);
String[][] options = new String[][]{{"test"}};
PowerMockito.when(Standard.class, "validOptions", options, mockReporter).thenReturn(true);
assertTrue(adapter.validOptions(options, mockReporter));
PowerMockito.verifyStatic();
Standard.validOptions(options, mockReporter);
}
示例12: start
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
/**
* As specified by the Doclet specification.
*
* @param rootDoc The root doc.
*
* @return `true`, if process was successful.
*
* @see com.sun.javadoc.Doclet#start(RootDoc)
*/
public static boolean start(RootDoc rootDoc) {
final MarkdownTaglets markdownTaglets = MarkdownTaglets.instance();
Options options = new Options();
String[][] forwardedOptions = options.load(rootDoc.options(), rootDoc);
if ( forwardedOptions == null ) {
return false;
}
MarkdownDoclet doclet = new MarkdownDoclet(options, rootDoc);
markdownTaglets.setDocErrorReporter(doclet);
doclet.process();
if ( doclet.isError() ) {
return false;
}
RootDocWrapper rootDocWrapper = new RootDocWrapper(rootDoc, forwardedOptions);
if ( options.isHighlightEnabled() ) {
// find the footer option
int i = 0;
for ( ; i < rootDocWrapper.options().length; i++ ) {
if ( rootDocWrapper.options()[i][0].equals("-footer") ) {
rootDocWrapper.options()[i][1] += HIGHLIGHT_JS_HTML;
break;
}
}
if ( i >= rootDocWrapper.options().length ) {
rootDocWrapper.appendOption("-footer", HIGHLIGHT_JS_HTML);
}
}
return Standard.start(rootDocWrapper) && doclet.postProcess();
}
示例13: start
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static boolean start(RootDoc root) {
System.out.println(
IncludePublicAnnotationsStandardDoclet.class.getSimpleName());
RootDocProcessor.treatUnannotatedClassesAsPrivate = true;
return Standard.start(RootDocProcessor.process(root));
}
示例14: validOptions
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static boolean validOptions(String[][] options,
DocErrorReporter reporter) {
StabilityOptions.validOptions(options, reporter);
String[][] filteredOptions = StabilityOptions.filterOptions(options);
return Standard.validOptions(filteredOptions, reporter);
}
示例15: start
import com.sun.tools.doclets.standard.Standard; //导入依赖的package包/类
public static boolean start(RootDoc root) {
System.out.println(
ExcludePrivateAnnotationsStandardDoclet.class.getSimpleName());
return Standard.start(RootDocProcessor.process(root));
}