File: brktest.java

package info (click to toggle)
jswat2 2.37-1
  • links: PTS
  • area: contrib
  • in suites: etch, etch-m68k
  • size: 7,092 kB
  • ctags: 5,592
  • sloc: java: 43,576; xml: 1,086; sh: 66; makefile: 57
file content (36 lines) | stat: -rw-r--r-- 1,271 bytes parent folder | download | duplicates (2)
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
35
36
public class brktest { // *
    static int staticInt;
    static { // *
        staticInt = 10; // *
    }
    static public void main(String[] args) {
        NotMuch myIFace = new NotMuch() { // *
                public void doNothingMuch() { // $1 *
                    System.out.println("Hello again"); // $1 *
                    NotMuch myIFace2 = new NotMuch() { // $1 *
                            public void doNothingMuch() { // $2 *
                                System.out.println("Hello once more"); // $2 *
                            } // $2 *
                        };
                    myIFace2.doNothingMuch(); // $1 *
                } // $1 *
            };
        System.out.println("Hello"); // *
        myIFace.doNothingMuch(); // *
        brktest2.test("blah"); // *
    } // *
    static interface NotMuch {
        public void doNothingMuch();
    }
}

class brktest2 { // *
    public static void test(String s) {
        System.out.println("brktest2 was run: (" + s + ")"); // *
    } // *
}

// Java parser and breakpoints setting test case (see bug #521).
// Lines of code are indicated by comments. Should be able to
// set breakpoints at every line of code. The $N in the comment
// indicates where the inner classes are located.