// TODO(harryh): maybe better to use a DefaultingExpressionVisitor
// here?
if (attr.getValue() instanceof ObjectConstant) {
ObjectConstant oc = (ObjectConstant) attr.getValue();
// TODO(harryh): maybe this should be in Validator?
if (!parameter.regexMatches(oc)) {
alertSink.add(new InvalidParameterFailedRegexError(
calleeName, name, parameter.getRegex(), oc));
}
attr = parameter.hasConstructor()
? attr.withValue(new ConstructedConstant(oc, oc.getValue(), callee, parameter))