if (parentResources.isEmpty()) {
urlDefiningMode = true;
}
}
} else if (!urlDefiningMode && CONSTRAINTS.equals(mappedURI)) {
ConstrainedPropertyBuilder builder = new ConstrainedPropertyBuilder(this);
if (args.length > 0 && (args[0] instanceof Closure)) {
Closure callable = (Closure) args[0];
callable.setDelegate(builder);
for (ConstrainedProperty constrainedProperty : currentConstraints) {
builder.getConstrainedProperties().put(constrainedProperty.getPropertyName(), constrainedProperty);
}
callable.call();
}
return builder.getConstrainedProperties();
} else {
return super.invokeMethod(mappedURI, arg);
}
} finally {
mappingInfoDeque.pop();