Actually, there's no reason not to reuse "@Pre" and "@Post" for this purpose. dean
On 9/23/06, Dean Wampler <[EMAIL PROTECTED]> wrote:
Very interesting idea. I'll put it on my list for the next release. I could see general-purpose @PreMethod and @PostMethod annotations that are applied to all methods in the class, with options to control whether or not they apply to just public methods, etc. You wouldn't even need to specify a test expression, if all you want are null checks, since those are the default expressions already for @Pre and @Post. I'm also planning to remove the restriction that you can't define tests for static methods. This seems pointless. The new annotations could be configurable to apply to statics, too, if desired. dean On 9/23/06, Wim Deblauwe <[EMAIL PROTECTED]> wrote: > Hi, > > very nice tool. Is it possible to avoid putting @Pre before every method and > just have a class annotation that says: all public methods should not accept > null or return null until I explicitly say so? I understand that Contract4j > is more powerful, but I believe for most programmers null checking is most > important without getting much overhead. > > Seems like Howard Lewis Ship has something like that already: > http://howardlewisship.com/blog/2006/04/gambling-on-aspectj.html > > regards, > > Wim > > 2006/9/23, Dean Wampler <[EMAIL PROTECTED]>: > > I'm pleased to announce v0.6.0 of Contract4J5, an open-source, Design by > > Contract tool for Java 5, using Java 5 annotations and AspectJ. > > > > This release restructures Contract4J5 to provide more flexible > > configuration options (including the option of using Spring dependency > > injection) and support for load-time weaving, which is the easiest way > > to adopt C4J. > > > > For more information, see http://www.contract4J.org and > > > http://blog.aspectprogramming.com/articles/2006/09/21/contract4j5-v0-6-0-is-now-available. > > > > Dean > > > > -- > > > > Dean Wampler, Ph.D. > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > http://www.objectmentor.com > > http://www.aspectprogramming.com > > http://www.contract4j.org > > I want my tombstone to say: > > Unknown Application Error in Dean Wampler.exe. > > Application Terminated. > > [Okay] [Cancel] > > > > _______________________________________________ > > aspectj-users mailing list > > [email protected] > > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > > > _______________________________________________ > aspectj-users mailing list > [email protected] > https://dev.eclipse.org/mailman/listinfo/aspectj-users > > > -- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://www.contract4j.org
-- Dean Wampler http://www.objectmentor.com http://www.aspectprogramming.com http://www.contract4j.org _______________________________________________ aspectj-users mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/aspectj-users
