KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > InputValidAssignIndent


1 public class InputValidAssignIndent
2 {
3     void foo(String JavaDoc[] args)
4     {
5         int i = 1 +
6             2 +
7             3;
8         String JavaDoc line = mIndentCheck[
9             getLineNo()];
10         String JavaDoc line1 =
11             getLine();
12         line1 =
13             getLine();
14         int i1
15             =
16             1;
17         i = 3;
18
19         Integer JavaDoc brace =
20             (candidate == SLIST)
21             ? candidate : null;
22
23         AnInterfaceFooWithALongName f =
24             new AnInterfaceFooWithALongName() {
25                 public void bar() {
26                 }
27             };
28
29         AnInterfaceFooWithALongName f1
30             = new AnInterfaceFooWithALongName() {
31                 public void bar() {
32                 }
33             };
34 // XXX: need to be fixed
35
// function.lastArgument().candidate = parameters;
36
// function.lastArgument().candidate
37
// =
38
// parameters;
39
// TODO: add more testing
40
}
41
42     private interface AnInterfaceFooWithALongName {
43         void bar();
44     }
45
46     private static final int SLIST = 1;
47     private static final int parameters = 1;
48     int candidate = 0;
49     private String JavaDoc[] mIndentCheck = null;
50     private InputValidAssignIndent function = null;
51     int getLineNo() {
52         return 1;
53     }
54     String JavaDoc getLine() {
55         return "";
56     }
57     InputValidAssignIndent lastArgument() {
58         return this;
59     }
60 }
61
Popular Tags