aboutsummaryrefslogtreecommitdiffstats
path: root/tests/features152/synchronization/ParsingAndMatching3.java
diff options
context:
space:
mode:
authoraclement <aclement>2006-05-24 07:15:42 +0000
committeraclement <aclement>2006-05-24 07:15:42 +0000
commitb2247654a3b35eb26731fac20247fc3007612eab (patch)
tree3b3bc6d6e2833e1d62aaf4506b1e8e3f4d12f51d /tests/features152/synchronization/ParsingAndMatching3.java
parent917a3a70f5c09f16151200f13eb89283c4bb2abf (diff)
downloadaspectj-b2247654a3b35eb26731fac20247fc3007612eab.tar.gz
aspectj-b2247654a3b35eb26731fac20247fc3007612eab.zip
synchronization joinpoints: testcode
Diffstat (limited to 'tests/features152/synchronization/ParsingAndMatching3.java')
-rw-r--r--tests/features152/synchronization/ParsingAndMatching3.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/features152/synchronization/ParsingAndMatching3.java b/tests/features152/synchronization/ParsingAndMatching3.java
new file mode 100644
index 000000000..7a6fee6c2
--- /dev/null
+++ b/tests/features152/synchronization/ParsingAndMatching3.java
@@ -0,0 +1,20 @@
+// lock and non-static context
+
+public aspect ParsingAndMatching3 {
+
+ before(): lock() {
+ System.err.println("Advice running at "+thisJoinPoint.getSourceLocation());
+ }
+
+ public static void main(String[] args) {
+ new Foo().nonstaticM();
+ }
+
+ static class Foo {
+ public void nonstaticM() {
+ synchronized (String.class) {
+ System.err.println("non-static method running");
+ }
+ }
+ }
+} \ No newline at end of file