com.sun.javadoc.DocErrorReporter Java Examples

The following examples show how to use com.sun.javadoc.DocErrorReporter. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DumpJavaDoc.java    From cxf with Apache License 2.0 6 votes vote down vote up
public static boolean validOptions(String[][] options, DocErrorReporter reporter) {
    boolean foundTagOption = false;
    for (int i = 0; i < options.length; i++) {
        String[] opt = options[i];
        if ("-dumpJavaDocFile".equals(opt[0])) {
            if (foundTagOption) {
                reporter.printError("Only one -dumpJavaDocFile option allowed.");
                return false;
            }
            foundTagOption = true;
        }
    }
    if (!foundTagOption) {
        reporter.printError("Usage: -dumpJavaDocFile theFileToDumpJavaDocForLaterUse...");
    }
    return foundTagOption;
}
 
Example #2
Source File: SwaggerPropertiesDoclet.java    From springfox-javadoc with Apache License 2.0 6 votes vote down vote up
/**
 * See <a href=
 * "https://docs.oracle.com/javase/8/docs/technotes/guides/javadoc/doclet/overview.html#options">Using
 * custom command-line options</a>
 * @param options command line options split as key value pairs on index 0 and 1
 * @param reporter reporter for errors
 * @return true if options are valid
 */
@SuppressWarnings("WeakerAccess")
public static boolean validOptions(
  String[][] options,
  DocErrorReporter reporter) {

    DocletOptionParser parser = new DocletOptionParser(options);

    try {
        docletOptions = parser.parse();
        return true;
    } catch (IllegalStateException e) {
        reporter.printError(e.getMessage());
    }
    return false;
}
 
Example #3
Source File: SwaggerMoreDoclet.java    From swagger-more with Apache License 2.0 5 votes vote down vote up
public static boolean validOptions(String[][] options, DocErrorReporter reporter) {
    // 插件参数校验需要实现的方法
    Arrays.stream(options).forEach(s -> {
        if (OPTION_CLASS_DIR.equalsIgnoreCase(s[0])) {
            classDir = s[1];
        }
    });
    return true;
}
 
Example #4
Source File: StabilityOptions.java    From hadoop with Apache License 2.0 5 votes vote down vote up
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;	
     }
   }
 }
 
Example #5
Source File: StabilityOptions.java    From big-c with Apache License 2.0 5 votes vote down vote up
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;	
     }
   }
 }
 
Example #6
Source File: Doclava.java    From doclava with Apache License 2.0 5 votes vote down vote up
public static boolean validOptions(String[][] options, DocErrorReporter r) {
  for (String[] a : options) {
    if (a[0].equals("-error") || a[0].equals("-warning") || a[0].equals("-hide")) {
      try {
        Integer.parseInt(a[1]);
      } catch (NumberFormatException e) {
        r.printError("bad -" + a[0] + " value must be a number: " + a[1]);
        return false;
      }
    }
  }

  return true;
}
 
Example #7
Source File: MarkdownTaglets.java    From markdown-doclet with GNU General Public License v3.0 5 votes vote down vote up
/**
 * # Handle the (potential) markdown options.
 *
 * @param options the options
 * @param errorReporter the error reporter
 * @return {@code true} if a markdown option has been found, otherwise false
 *
 * @see MarkdownTaglet#OPT_MD_TAGLET_OPTION_PREFIX
 * @see #optionLengths(String)
 */
public boolean handleOptions(String[] options, DocErrorReporter errorReporter) {
    final String potentialMarkdownTagletOption = options[0];

    if( potentialMarkdownTagletOption.startsWith(OPT_MD_TAGLET_OPTION_PREFIX) ) {
        storeMarkdownTagletOption(potentialMarkdownTagletOption, options[1]);
        return true;
    }

    return false;
}
 
Example #8
Source File: Options.java    From markdown-doclet with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Loads the options from the command line.
 *
 * @param options          The command line options.
 * @param errorReporter    The error reporter for printing messages.
 *
 * @return The options to be forwarded to the standard doclet.
 */
public String[][] load(String[][] options, DocErrorReporter errorReporter) {
    LinkedList<String[]> optionsList = new LinkedList<>(Arrays.asList(options));
    Iterator<String[]> optionsIter = optionsList.iterator();
    while ( optionsIter.hasNext() ) {
        String[] opt = optionsIter.next();
        if ( !handleOption(optionsIter, opt, errorReporter) ) {
            return null;
        }
    }
    if ( pegdownExtensions == null ) {
        setPegdownExtensions(DEFAULT_PEGDOWN_EXTENSIONS);
    }
    return optionsList.toArray(new String[optionsList.size()][]);
}
 
Example #9
Source File: ConfigStandardDoclet.java    From tez with Apache License 2.0 4 votes vote down vote up
public static boolean validOptions(String options[][], DocErrorReporter reporter) {
  return true;
}
 
Example #10
Source File: JavadocFilter.java    From pom-manipulation-ext with Apache License 2.0 4 votes vote down vote up
@SuppressWarnings( "unused" )
public static boolean validOptions( String[][] options, DocErrorReporter reporter)
{
    return Standard.validOptions(options, reporter);
}
 
Example #11
Source File: MarkdownTaglets.java    From markdown-doclet with GNU General Public License v3.0 4 votes vote down vote up
/**
 * # Makes the error reporter available to the markdown taglets.
 * @param errorReporter the error reporter.
 */
public void setDocErrorReporter(DocErrorReporter errorReporter) {
    this.errorHandler = new ErrorHandlerImpl(errorReporter);
    this.executor.setErrorHandler(errorHandler);
}
 
Example #12
Source File: MarkdownTaglets.java    From markdown-doclet with GNU General Public License v3.0 4 votes vote down vote up
private ErrorHandlerImpl(DocErrorReporter errorReporter) {
    this.errorReporter = errorReporter;
}
 
Example #13
Source File: GetTask_DocletClassTest.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #14
Source File: GetTask_DocletClassTest.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #15
Source File: ExcludePrivateAnnotationsStandardDoclet.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static boolean validOptions(String[][] options,
    DocErrorReporter reporter) {
  StabilityOptions.validOptions(options, reporter);
  String[][] filteredOptions = StabilityOptions.filterOptions(options);
  return Standard.validOptions(filteredOptions, reporter);
}
 
Example #16
Source File: IncludePublicAnnotationsStandardDoclet.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static boolean validOptions(String[][] options,
    DocErrorReporter reporter) {
  StabilityOptions.validOptions(options, reporter);
  String[][] filteredOptions = StabilityOptions.filterOptions(options);
  return Standard.validOptions(filteredOptions, reporter);
}
 
Example #17
Source File: ExcludePrivateAnnotationsJDiffDoclet.java    From big-c with Apache License 2.0 4 votes vote down vote up
public static boolean validOptions(String[][] options,
    DocErrorReporter reporter) {
  StabilityOptions.validOptions(options, reporter);
  String[][] filteredOptions = StabilityOptions.filterOptions(options);
  return JDiff.validOptions(filteredOptions, reporter);
}
 
Example #18
Source File: GetTask_DocletClassTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #19
Source File: GetTask_DocletClassTest.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #20
Source File: GetTask_DocletClassTest.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #21
Source File: GetTask_DocletClassTest.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #22
Source File: GetTask_DocletClassTest.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #23
Source File: GetTask_DocletClassTest.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #24
Source File: GetTask_DocletClassTest.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #25
Source File: GetTask_DocletClassTest.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #26
Source File: GetTask_DocletClassTest.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #27
Source File: PSDoclet.java    From PrivacyStreams with Apache License 2.0 4 votes vote down vote up
public static boolean validOptions(String options[][], DocErrorReporter reporter) {
    return HtmlDoclet.validOptions(options, reporter);
}
 
Example #28
Source File: GetTask_DocletClassTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #29
Source File: GetTask_DocletClassTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}
 
Example #30
Source File: GetTask_DocletClassTest.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public static boolean validOptions(String options[][],
        DocErrorReporter reporter) {
    return true;  // default is options are valid
}