is it always true when you over-load
the method m in the Child class ?
Cordialement / Best regards
Jean-Louis
Pasturel
Why i can't limite the join point generate only at
parent.m();?
Now the join point are generate at parent.m();
and child.m(); in Main class.
Thank you~
================================================
public aspect Example {
pointcut jp_call_Parent_m():
call(void m()) && target(Parent);
before(): jp_call_Parent_m(){
System.out.println("entering: " + thisJoinPoint);
System.out.println(" at: " +
thisJoinPoint.getSourceLocation());
}
}
================================================
public class Main {
public Main(){
Parent parent = new Parent();
parent.m();
Child child = new Child();
child.m();
}
public static void main(String[] args) {
new Main();
}
}
================================================
public class Parent {
public Parent(){
System.out.println("Constructor of Parent
execution.");
}
public void x(){
System.out.println("Method x of Parent execution.");
}
public void m(){
System.out.println("Method m of Parent execution.");
}
}
================================================
public class Child extends Parent{
}
*********************************
This message and any attachments (the "message") are confidential and intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
Messages are susceptible to alteration.
France Telecom Group shall not be liable for the message if altered, changed or falsified.
If you are not the intended addressee of this message, please cancel it immediately and inform the sender.
********************************
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users