[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[ews.eclipse.technology.aspectj] AspectJ: around() advice for setName() in derived class
|
Hello,
I have two classes:
class A {
private String name;
public void setName (String name) { this.name = name; }
}
class B extends A;
I want to create an advice which allows me to "fix" the name before it
is passed into setName() by calling a method validateName() (this is
defined in the advice).
This works.
Now, I want to create a second advice which does the same with a
*different* validateName() method for B.
I tried
pointcut setter (B b): execution(public void B.setName(*)) && target (b);
void around(B obj, String newValue) :
setter (obj) && args (newValue) { ... }
but the around advice is not applied to anything. What's wrong?
Regards,
--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://www.philmann-dark.de/