[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Capturing setting inside List
|
Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester, SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/
André Dantas Rocha <ad-rocha@xxxxxxxxxx>@eclipse.org on 14/04/2005 21:14:09
Please respond to aspectj-users@xxxxxxxxxxx
Sent by: aspectj-users-bounces@xxxxxxxxxxx
To: <aspectj-users@xxxxxxxxxxx>
cc:
Subject: [aspectj-users] Capturing setting inside List
Suppose I have this classes...
public class A implement Serializable {
List list = new ArrayList();
public add(Object o) {
list.add(o);
}
}
public class B {
int x;
setX(int x) {
this.x = x;
}
}
... and a main method:
public void main(String[] args) {
a1 = new A();
b1 = new B();
a1.add(b1);
a2 = new A();
b2 = new B();
a2.add(b2);
b1.setX(3); // a1 affected
}
I would like to serialize the A object every time an element in his List is
modified (in this case, only a1 will be serialized).
Is it possible to intercep this pointcut using AspectJ?
Thanks,
André_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users