What is the issue of having the unwrapper classes part of the API?
As a library author, I try to expose as less types/methods as possible via the API.
This a) makes the API easier to understand and use (e.g. its JavaDoc will not contained an unwrap() method which a user is never expected to invoke anyways) and b) gives me as author more liberty to change the code base (e.g. re-organize packaging or rename types etc.) which is not as easy once types are part of the API.
Also the user is only interested in expressing that unwrapping should take place (or not) - so having @UnwrapValidationValue in the API makes sense - but she doesn't need to care how (using which implementation mechanism) this intention is satisified.
|