~ubuntu-branches/ubuntu/natty/aspectj/natty

« back to all changes in this revision

Viewing changes to org.aspectj/modules/tests/new/staticMethAdv/Driver.java

  • Committer: Bazaar Package Importer
  • Author(s): Damien Raude-Morvan
  • Date: 2009-10-04 16:37:23 UTC
  • mfrom: (1.1.3 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091004163723-ck4y7j7fhjxskkie
Tags: 1.6.6+dfsg-1
* New upstream release.
  - Update 02_use_gjdoc.diff patch
* Update my email address

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
import org.aspectj.testing.Tester;
3
 
 
4
 
// PR#151
5
 
 
6
 
public class Driver {
7
 
    public static void main(String[] args) { test(); }
8
 
    public static void test() {
9
 
        Tester.checkEqual(C.set(), "C-advised-set", "");
10
 
    }    
11
 
    
12
 
    static advice(C c): c && * *(..) {
13
 
        before {
14
 
            if (c != null) 
15
 
                Tester.check(false, "c == null");
16
 
            else 
17
 
                c.s += "-advised";
18
 
        }
19
 
    } 
20
 
}
21
 
 
22
 
class C {
23
 
    static String s = "C";
24
 
    
25
 
    static String set() {
26
 
        s += "-set";
27
 
        return s;
28
 
    }
29
 
}