|
http://tools.ietf.org/html/rfc6020#section-7.3.4 specifies that whenever a type is derived so that its constraints are not satisfied by the default value, a new default value needs to be set.
This applies to DerivedTypes and ConcreteTypes, whose builder must check if this criterion is met. The check should be performed only when the default or constraints are changed. The problem should be reported via a new exception, DefaultViolatesConstraintsException, which is a subclass of IllegalArgumentException.
For performance reasons, which requires us to retain compiled regular expressions in PatternConstraint – define a new interface and an implementation, such that the compiled pattern can be exposed to other users.
|