[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] LockSignature & UnlockSignature
|
https://bugs.eclipse.org/bugs/show_bug.cgi?id=123759
public aspect AfterLock {
after(Foo f): lock() && this(f) {
System.err.println("after(Foo) lock: advice running at
"+thisJoinPoint.getSourceLocation());
}
after(): lock() {
System.err.println("after() lock: advice running at
"+thisJoinPoint.getSourceLocation());
}
public static void main(String[] args) {
Foo aFoo = new Foo();
aFoo.staticM();
aFoo.nonstaticM();
}
static class Foo {
public void nonstaticM() {
synchronized (this) {
System.err.println("non-static method running");
}
}
public static void staticM() {
synchronized (String.class) {
System.err.println("static method running");
}
}
}
}
Read the bug report to see how to turn on support for lock() and unlock()
Andy.
2008/7/8 Bhaskar Maddala <maddalab@xxxxxxxxx>:
> Hello,
>
> I was just browsing the aspectj runtime api
>
> http://www.eclipse.org/aspectj/doc/released/runtime-api/index.html
>
> and noticed 2 documented signature types, LockSignature and
> UnlockSignature, were these meant to be documented? If so, I do not
> seem to be able to find the language construct documentation where I
> could make sense of these. Where can I find these?
>
> or how do I capture join points corresponding to LockSignature and
> UnlockSignature?
>
>
> Thanks
> Bhaskar
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>