當前位置: 首頁>>代碼示例>>Java>>正文


Java DocErrorReporter類代碼示例

本文整理匯總了Java中com.sun.javadoc.DocErrorReporter的典型用法代碼示例。如果您正苦於以下問題:Java DocErrorReporter類的具體用法?Java DocErrorReporter怎麽用?Java DocErrorReporter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DocErrorReporter類屬於com.sun.javadoc包,在下文中一共展示了DocErrorReporter類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static boolean validOptions(String[][] options, DocErrorReporter reporter) {
  boolean sawOutput = false;

  for (int i = 0; i < options.length; i++) {
    String[] option = options[i];

    if (option[0].equals("-output")) {
      File output = new File(option[1]);
      if (output.exists() && output.isDirectory()) {
        reporter.printError("Output file " + output + " is a directory");
        return false;

      } else {
        sawOutput = true;
      }
    }
  }

  if (!sawOutput) {
    reporter.printError("Missing -output");
    return false;
  }

  return true;
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:26,代碼來源:UnitTestDoclet.java

示例2: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static boolean validOptions(String[][] options, DocErrorReporter reporter) {
    for (int i = 0 ; i < options.length; i++) {
       String opt = options[i][0].trim();
       switch (opt) {
           case "-genErrors":
               genErrors = true;
               genWarnings = false;
               break;
           case "-genWarnings":
               genErrors = false;
               genWarnings = true;
               break;
       }
    }
    return true;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:17,代碼來源:Test.java

示例3: checkOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
/**
 * Checks that only valid options was specified.
 * @param options all parsed options
 * @param reporter the reporter to report errors.
 * @return true if only valid options was specified
 */
public static boolean checkOptions(String[][] options, DocErrorReporter reporter) {
    boolean foundDestFileOption = false;
    boolean onlyOneDestFileOption = true;
    for (final String[] opt : options) {
        if (DEST_FILE_OPT.equals(opt[0])) {
            if (foundDestFileOption) {
                reporter.printError("Only one -destfile option allowed.");
                onlyOneDestFileOption = false;
                break;
            }
            foundDestFileOption = true;
        }
    }
    if (!foundDestFileOption) {
        reporter.printError("Usage: javadoc -destfile file -doclet TokenTypesDoclet ...");
    }
    return onlyOneDestFileOption && foundDestFileOption;
}
 
開發者ID:rnveach,項目名稱:checkstyle-backport-jre6,代碼行數:25,代碼來源:TokenTypesDoclet.java

示例4: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的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;
}
 
開發者ID:mikesamuel,項目名稱:closure-maven-plugin,代碼行數:20,代碼來源:PluginConfigDoclet.java

示例5: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static boolean validOptions(String options[][],
                                   DocErrorReporter reporter) {
    boolean foundOutput = false;
    boolean foundTemplate = false;

    for (int i = 0; i < options.length; i++) {
        String[] opt = options[i];
        if (opt[0].equals("-o")) {
            foundOutput = true;
            output = opt[1];
        } else if (opt[0].equals("-ft")) {
            foundTemplate = true;
            template = new FileTemplateOption(opt[1]);
        } else if (opt[0].equals("-ct")) {
            foundTemplate = true;
            template = new ClasspathTemplateOption(opt[1]);
        }
    }

    if (!foundOutput || !foundTemplate) {
        reporter.printError("Usage: javadoc -o OUTPUT_FILE -t TEMPLATE_FILE ...");
        return false;
    }

    return true;
}
 
開發者ID:diogoko,項目名稱:freemarker-doclet,代碼行數:27,代碼來源:FreeMarkerDoclet.java

示例6: buildOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
private Options buildOptions(DocletOptions docletOptions, DocErrorReporter errorReporter) {
    OptionsBuilder opts = defaultOptions();
    if (docletOptions.baseDir().isPresent()) {
        opts.baseDir(docletOptions.baseDir().get());
    }
    if (templates.isPresent()) {
        opts.templateDir(templates.get().templateDir());
    }
    opts.attributes(buildAttributes(docletOptions, errorReporter));
    if (docletOptions.requires().size() > 0) {
        for (String require : docletOptions.requires()) {
            asciidoctor.rubyExtensionRegistry().requireLibrary(require);
        }
    }
    return opts.get();
}
 
開發者ID:asciidoctor,項目名稱:asciidoclet,代碼行數:17,代碼來源:AsciidoctorRenderer.java

示例7: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static void validOptions(String[][] options,
     DocErrorReporter reporter) {
   for (int i = 0; i < options.length; i++) {
     String opt = options[i][0].toLowerCase(Locale.ENGLISH);
     if (opt.equals(UNSTABLE_OPTION)) {
RootDocProcessor.stability = UNSTABLE_OPTION;
     } else if (opt.equals(EVOLVING_OPTION)) {
RootDocProcessor.stability = EVOLVING_OPTION;
     } else if (opt.equals(STABLE_OPTION)) {
RootDocProcessor.stability = STABLE_OPTION;	
     }
   }
 }
 
開發者ID:naver,項目名稱:hadoop,代碼行數:14,代碼來源:StabilityOptions.java

示例8: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static void validOptions(String[][] options, DocErrorReporter reporter) {
  for (int i = 0; i < options.length; i++) {
    String opt = options[i][0].toLowerCase();
    if (opt.equals(UNSTABLE_OPTION)) {
      RootDocProcessor.stability = UNSTABLE_OPTION;
    } else if (opt.equals(EVOLVING_OPTION)) {
      RootDocProcessor.stability = EVOLVING_OPTION;
    } else if (opt.equals(STABLE_OPTION)) {
      RootDocProcessor.stability = STABLE_OPTION;
    }
  }
}
 
開發者ID:fengchen8086,項目名稱:ditb,代碼行數:13,代碼來源:StabilityOptions.java

示例9: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static void validOptions(String[][] options,
    DocErrorReporter reporter) {
  for (int i = 0; i < options.length; i++) {
    String opt = options[i][0].toLowerCase(Locale.ENGLISH);
    if (opt.equals(UNSTABLE_OPTION)) {
      RootDocProcessor.stability = UNSTABLE_OPTION;
    } else if (opt.equals(EVOLVING_OPTION)) {
      RootDocProcessor.stability = EVOLVING_OPTION;
    } else if (opt.equals(STABLE_OPTION)) {
      RootDocProcessor.stability = STABLE_OPTION;
    }
  }
}
 
開發者ID:aliyun-beta,項目名稱:aliyun-oss-hadoop-fs,代碼行數:14,代碼來源:StabilityOptions.java

示例10: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
public static boolean validOptions(final String[][] options, final DocErrorReporter reporter) {
	System.out.println("VALIDATING OPTIONS");
	final Options opt = new Options(options);
	if ((opt.factoryNames.size() == 0) || (opt.outputPath == null)) {
		reporter.printError("Usage: -factory com.example.MyClass -destDir <outputFolder> [ -json ] [ -nohtml ]");
		return false;
	}
	return true;
}
 
開發者ID:emily-e,項目名稱:webframework,代碼行數:10,代碼來源:ScriptingObjectDoclet.java

示例11: validOptions

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
/**
 * Valid options boolean.
 *
 * @param options  the options
 * @param reporter the reporter
 * @return the boolean
 */
public static boolean validOptions(final String[][] options, final DocErrorReporter reporter) {
    try {
        Options.validate(options);
    } catch (IllegalStateException e) {
        log.debug(e.getMessage(), e);
        reporter.printError(e.getMessage());
        return false;
    }
    return true;
}
 
開發者ID:myunusov,項目名稱:maxur-ldoc,代碼行數:18,代碼來源:LivingDocumentation.java

示例12: setUp

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
@Before
public void setUp() {
    mockReporter = Mockito.mock(DocErrorReporter.class);
    UMLDocletConfig config = new UMLDocletConfig(new String[0][], mockReporter);

    renderer = new YabadabadooRenderer(new DiagramRenderer(config));
}
 
開發者ID:talsma-ict,項目名稱:umldoclet,代碼行數:8,代碼來源:RendererTest.java

示例13: testSplitDefaultValue

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
@Test
public void testSplitDefaultValue() {
    UMLDocletConfig config = new UMLDocletConfig(new String[0][], mock(DocErrorReporter.class));
    assertThat(config.excludedReferences(), is(equalTo((Collection<String>) asList(
            Object.class.getName(), Enum.class.getName(), Annotation.class.getName()
    ))));
}
 
開發者ID:talsma-ict,項目名稱:umldoclet,代碼行數:8,代碼來源:UMLDocletConfigTest.java

示例14: testSplitMultipleOccurrances

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
@Test
public void testSplitMultipleOccurrances() {
    UMLDocletConfig config = new UMLDocletConfig(new String[][]{
            {"-umlExcludedReferences", Object.class.getName()},
            {"-umlExcludedReferences", Enum.class.getName()}
    }, mock(DocErrorReporter.class));

    assertThat(config.excludedReferences(), is(equalTo((Collection<String>) asList(
            Object.class.getName(), Enum.class.getName()
    ))));
}
 
開發者ID:talsma-ict,項目名稱:umldoclet,代碼行數:12,代碼來源:UMLDocletConfigTest.java

示例15: testIssue37_packagePrivateClassesDefaultValue

import com.sun.javadoc.DocErrorReporter; //導入依賴的package包/類
@Test
public void testIssue37_packagePrivateClassesDefaultValue() {
    UMLDocletConfig config = new UMLDocletConfig(new String[0][], mock(DocErrorReporter.class));
    ClassDoc packagePrivateClassDoc = mock(ClassDoc.class);
    when(packagePrivateClassDoc.isPackagePrivate()).thenReturn(true);
    when(packagePrivateClassDoc.tags(anyString())).thenReturn(new Tag[0]);
    when(packagePrivateClassDoc.annotations()).thenReturn(new AnnotationDesc[0]);

    assertThat(config.includeClass(packagePrivateClassDoc), is(false));
}
 
開發者ID:talsma-ict,項目名稱:umldoclet,代碼行數:11,代碼來源:UMLDocletConfigTest.java


注:本文中的com.sun.javadoc.DocErrorReporter類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。