AspectJ... hasChanged aspect?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Phillipo

    AspectJ... hasChanged aspect?

    Is this a good idea? I would like to know when some of my objects
    have changed. Would it a) be a good idea to write this as an aspect
    rather than cluttering classes. b) what would be the best way to
    write it? My plan is to add a boolean and method for hasChanged and
    set this boolean based on the value of the the input to the setter
    methods compaired with the current value of the coresponding getter
    method.

    If there is a better way of doing this I would like to hear it,
    however it does nicely remove an added level of complexity from many
    methods in my system.

    I'm new to aspect oriented programming but it certainly seems to me to
    be a massive step forward in designing software.
Working...