Design by Contract, using annotations?
How hard would it be to implement "design by contract" using annotations? Wouldn't it be extremely easy (and useful) to do so?
I am proposing:
\-> Only applicable to methods, get converted into assert() statements at the beginning and end of the method, respectively.
\-> Only applicable to classes, get inserted into the beginning *and* end of methods in the form of assert() statements.
Theoretically speaking, this wouldn't even have to come from Sun, but rather can come from a 3rd-party library (Sun should integrate it in some future release)
What do you think?