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.
      • isVersion

        public boolean isVersion()
        Returns whether parsing just requested the --version 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.
      • getDeprecatedOptionsUsed

        public Map<String,​String> getDeprecatedOptionsUsed()
        Returns a map of deprecated CLI options used by the command that created this instance. Each key is a deprecated option that was used, and the value is a suggested replacement (a piece of English text).
      • toConfiguration

        public PMDConfiguration toConfiguration()
        Returns the resulting configuration if parsing succeeded and neither isHelp() nor isVersion() is requested. Otherwise returns null.