KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > api > debugger > jpda > testapps > LineBreakpointApp


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.api.debugger.jpda.testapps;
21
22 /**
23  * Sample line breakpoints application. DO NOT MODIFY - line numbers must not change in this source file.
24  *
25  * @author Maros Sandor
26  */

27 public class LineBreakpointApp {
28
29     static int x = 20;
30
31     static {
32         x += 30;
33     }
34
35     public static void main(String JavaDoc[] args) {
36         LineBreakpointApp sa = new LineBreakpointApp();
37         x += sa.m1();
38
39         int isq = InnerStatic.getQ();
40         InnerStatic is = new InnerStatic();
41         int isw = is.getW();
42     }
43
44     private int y = 20;
45
46     {
47         y += 10;
48     }
49
50     public LineBreakpointApp() {
51         y += 100;
52     }
53
54     private int m1() {
55         int im1 = 10;
56         m2();
57         Inner ic = new Inner();
58         int iw = ic.getW();
59         return im1;
60     }
61
62     private int m2() {
63         int im2 = 20;
64         m3();
65         return im2;
66     }
67
68     private int m3() {
69         int im3 = 30;
70         return im3;
71     }
72
73     private static class InnerStatic {
74
75         private static int q = 200;
76
77         static {
78             q += 40;
79         }
80
81         private int w = 70;
82
83         {
84             w += 10;
85         }
86
87         public InnerStatic() {
88             w += 100;
89         }
90
91         public static int getQ() {
92             return q;
93         }
94
95         public int getW() {
96             return w;
97         }
98     }
99
100     private class Inner {
101
102         private int w = 70;
103
104         {
105             w += 10;
106         }
107
108         public Inner() {
109             w += 100;
110         }
111
112         public int getW() {
113             return w;
114         }
115     }
116
117 }
118
Popular Tags