I have a class (i.e A) that has a lot of class that inherit from it, and I have a protected variable (i.e foo) in this class.
Is there any way to get notification every time that some object change this var?
Because it's protected, any class that inherit from it can simply change it's value outside A class (i.e
public class B extends A
{
public void changeAFoo()
{
foo = 4;
}
}
)
It's a big project and I can't simply go one by one and put a breakpoints, and I also can't put breakpoints inside A class because require that it will change through there.
How can follow this var value under those circumstances?
Thanks!