Class PmdParametersParseResult


  • public final class PmdParametersParseResult
    extends Object
    Result of parsing a bunch of CLI arguments. Parsing may fail with an exception, or succeed and produce a PMDConfiguration. If the --help argument is mentioned, no configuration is produced.
    • Method Detail

      • isError

        public boolean isError()
        Returns true if parsing failed.
      • isHelp

        public boolean isHelp()
        Returns whether parsing just requested the --help text. In this case no configuration is produced.
      • getError

        public com.beust.jcommander.ParameterException getError()
        Returns the error if parsing failed. Parsing may fail if required parameters are not provided, or if some parameters don't pass validation. Otherwise returns null.
      • toConfiguration

        public PMDConfiguration toConfiguration()
        Returns the resulting configuration if parsing succeeded and not {@link #isHelp(). Otherwise returns null.