Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Static crosscutting

For a reusable version of bean support, please look at 
a solution that I posted to a JavaRanch forum:

http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&f=14&t=000304

-Ramnivas

--- Eric Jain <Eric.Jain@xxxxxxxxxx> wrote:
> I currently need to do something very similar to the example at
>
http://dev.eclipse.org/viewcvs/indextech.cgi/~checkout~/aspectj-home/doc/progguide/examples-production.html#d0e2676
> (adding property change support to existing classes). I assume such
> an
> aspect for adding property change support to a class could be applied
> to
> several classes at once, or would I need to write one aspect per
> class
> (not feasable)?
> 
> Is there a good reason why the example uses a caller rather than a
> 'set'
> pointcut (would seem more suitable here)?
> 
> Another issue is how to deal with collection classes. Is it possible
> to
> not only add advice to method calls such as
> someObject.setChildren(someList), but also to
> someObject.getChildren().add(something)?
> 
> The problem here is that the 'children' field is a standard
> ArrayList.
> One obvious solution would be to replace it with a custom list class
> that can be modified, but perhaps there is a more elegant way to
> detect
> changes to collections with AspectJ.
> 
> --
> Eric Jain
> 
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com


Back to the top