KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > puppycrawl > tools > checkstyle > indentation > InputValidClassDefIndent


1 /*
2  * InputValidMethodIndent.java
3  *
4  * Created on November 11, 2002, 10:13 PM
5  */

6
7
8
9 package com.puppycrawl.tools.checkstyle.indentation;
10
11 import java.awt.event.ActionEvent JavaDoc;
12 import java.awt.event.ActionListener JavaDoc;
13 import javax.swing.JButton JavaDoc;
14
15 /**
16  *
17  * @author jrichard
18  */

19 public class InputValidClassDefIndent
20     extends java.awt.event.MouseAdapter JavaDoc implements java.awt.event.MouseListener JavaDoc {
21     
22
23 }
24
25 class InputValidClassDefIndent2
26     extends java.awt.event.MouseAdapter JavaDoc implements java.awt.event.MouseListener JavaDoc
27 {
28
29 }
30
31 class InputValidClassDefIndent3
32     extends java.awt.event.MouseAdapter JavaDoc
33     implements java.awt.event.MouseListener JavaDoc
34 {
35
36 }
37
38 final class InputValidClassDefIndent4
39     extends java.awt.event.MouseAdapter JavaDoc
40     implements java.awt.event.MouseListener JavaDoc
41 {
42
43 }
44
45 final
46 class InputValidClassDefIndent4a
47     extends java.awt.event.MouseAdapter JavaDoc
48     implements java.awt.event.MouseListener JavaDoc
49 {
50
51 }
52
53 final class InputValidClassDefIndent5 extends java.awt.event.MouseAdapter JavaDoc implements java.awt.event.MouseListener JavaDoc
54 {
55
56 }
57
58 final class InputValidClassDefIndent6 extends java.awt.event.MouseAdapter JavaDoc implements java.awt.event.MouseListener JavaDoc {
59
60     class foo { }
61
62     
63     class foo2 { public int x; }
64
65     
66     class foo3 {
67         public
68         int x;
69     }
70
71     
72     class foo4 {
73         public int x;
74     }
75     
76     
77     private void myMethod() {
78         class localFoo {
79             
80         }
81
82         class localFoo2 {
83             int x;
84             
85             int func() { return 3; }
86         }
87
88         
89         // TODO: this is broken right now:
90
// 1) this is both an expression and an OBJBLOCK
91
// 2) methods aren't yet parsed
92
// 3) only CLASSDEF is handled now, not OBJBLOCK
93
new JButton JavaDoc().addActionListener(new ActionListener JavaDoc()
94         {
95             public void actionPerformed(ActionEvent JavaDoc e) {
96                 
97             }
98         });
99
100         
101         new JButton JavaDoc().addActionListener(new ActionListener JavaDoc() {
102             public void actionPerformed(ActionEvent JavaDoc e) {
103                 int i = 2;
104             }
105         });
106         
107         Object JavaDoc o = new ActionListener JavaDoc()
108         {
109             public void actionPerformed(ActionEvent JavaDoc e) {
110                 
111             }
112         };
113
114         myfunc2(10, 10, 10,
115             myfunc3(11, 11,
116                 11, 11),
117             10, 10,
118             10);
119     }
120
121     private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
122     }
123
124     private int myfunc3(int a, int b, int c, int d) {
125         return 1;
126     }
127
128     /** The less than or equal operator. */
129     public static final Operator LT_OR_EQUAL =
130         new Operator(
131             "<=",
132             new OperatorHelper()
133             {
134                 public boolean compare(int value1, int value2)
135                 {
136                     return (value1 <= value2);
137                 }
138
139                 public boolean compare(Comparable JavaDoc obj1, Comparable JavaDoc obj2)
140                 {
141                     return (obj1.compareTo(obj2) <= 0);
142                 }
143             });
144 }
145
146 class HashingContainer<K, V> {
147     @Deprecated JavaDoc
148     public Object JavaDoc[] table;
149
150     @Override JavaDoc
151     public String JavaDoc toString() {
152         return "";
153     }
154 }
155
156 class Operator {
157     public Operator(String JavaDoc str, OperatorHelper handler) {
158     }
159 }
160
161 class OperatorHelper {
162 }
163
Popular Tags