public URI getUri(List<String> keyAliases, URI defaultValue, Predicate<URI> constraint, String message) {
        AliasValueEntry candidate = getValue(keyAliases);
        if (candidate == null || StringUtils.isBlank(candidate.value)) {
            return defaultValue;
        }

        URI parsedUri;

        try {
            parsedUri = URI.create(candidate.value);
        } catch (IllegalArgumentException iae) {
            throw InvalidOptionConfigurationException
                 .parseFailure(candidate.alias, "URI", candidate.value, iae);
        }
        if (!constraint.test(parsedUri)) {
            throw InvalidOptionConfigurationException
                 .constraintFailure(candidate.alias, "URI", candidate.value, message);
        }
        return parsedUri;
    }
Parse a {@link URI} from the options using the key aliases. Note that this method does not guarantee the URI exists.
Use a constraint predicate for validation.

@param keyAliases   the key aliases
@param defaultValue the default value
@param constraint   the constraint that the value should obey
@param message      a human-readable message to describe a constraint failure
@return the parsed path

@throws InvalidOptionConfigurationException if a constraint violation occurs.
common/config/src/main/java/io/apiman/common/config/options/GenericOptionsParser.java