/** * Query to see if an option has been set. * * @param option the option that we want to query for * * @return true if set, false if not */ @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public Boolean getBooleanValue(Option option) throws IllegalStateException { ensureCommandLineNotNull(); return commandLine.hasOption(option.getOpt()); }
/** * Retrieves the argument as a String object, if any, of an option. * * @param option the option that we want argument value to be returned for * * @return Value of the argument if option is set, and has an argument, otherwise defaultValue. */ @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public String getStringValue(Option option) throws IllegalStateException { ensureCommandLineNotNull(); return commandLine.getOptionValue(option.getOpt()); }
/** * Query to see if an option has been set. * * @param option the option that we want to query for * * @return true if set, false if not */ @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public Boolean getBooleanValue(Option option) throws IllegalStateException { ensureCommandLineNotNull(); return commandLine.hasOption(option.getOpt()); }
/** * Retrieves the argument as a String object, if any, of an option. * * @param option the option that we want argument value to be returned for * * @return Value of the argument if option is set, and has an argument, otherwise defaultValue. */ @SuppressFBWarnings(value = "UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR", justification = "This is a false positive. A null check is present.") public String getStringValue(Option option) throws IllegalStateException { ensureCommandLineNotNull(); return commandLine.getOptionValue(option.getOpt()); }
ensureCommandLineNotNull(); String stringValue = getStringValue(option);
ensureCommandLineNotNull(); String stringValue = getStringValue(option);