aboutsummaryrefslogtreecommitdiffstats
path: root/tests/jquery-1.6.2.js
Commit message (Expand)AuthorAgeFilesLines
* Remove trailing whitespace and add final newlinesTrey Hunner2012-10-211-55/+55
* Tests: Added ability to run tests suites against different versions of jQuery...Scott González2011-07-281-0/+8981
27ca406b065a6b8'>root/tests/features151/ataround/X7.java
blob: 6fb46cc837b331e0509f2da747ff74210e0ce083 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Bind the this on a call and change it with proceed... it is ignored

aspect X7 {
  M newM = new M("2");

  void around(M t,String p): call(void M.method(String)) && args(p) && this(t) {
    System.err.println("advice from code aspect");
    proceed(newM, "faked");
  }

  public static void main(String []argv) {
    M.main(argv);
  }
}



class M {

  String prefix;

  public M(String prefix) { this.prefix = prefix; }

  public static void main( String[] args ) {
    M m = new M("1");
    m.methodCaller("real");
  }

  public void methodCaller(String param) {
    method(param);
  }

  public void method(String s) { System.err.println(prefix+s); }
}