I would rather use a factory for instantiating objects in a clean way which
helps to avoid duplicate equal instances.
And BTW, I do hope that long-living entities like bank accounts persist their
status anyway. Anything else would be a design flaw in your application.
Anyway, you can still use
The intention is to keep track of the behaviour of object with a long life
span. For example checking that a bank account object follows a particular
life cycle (ie sequence of method calls). Yes, if A goes out of scope and B
appears (and A.equals(B)), then the aspect should still remember the
beha
It depends on what you actually want to do. What is the intention behind
perthis/pertarget? Which kind of state do you want to keep for each equal set
of objects? Which joinpoints do you want to match and what should your advice
do? And what should happen if object A goes out of scope and gets
Hi,
I am trying to associate an aspect per object but taking into consideration
the "equals" method,
i.e. if a.equals(b) then a and b share the same aspect.
My approach is to use a unique "wrapper" object for both a and b and apply
the perthis/pertarget on the "wrapper".
Is there a smarter way