Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/puppycrawl/tools/checkstyle/indentation/InputValidClassDefIndent.java


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;
12  import java.awt.event.ActionListener;
13  import javax.swing.JButton;
14  
15  /**
16   *
17   * @author  jrichard
18   */
19  public class InputValidClassDefIndent 
20      extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
21      
22  
23  }
24  
25  class InputValidClassDefIndent2 
26      extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
27  {
28  
29  }
30  
31  class InputValidClassDefIndent3
32      extends java.awt.event.MouseAdapter 
33      implements java.awt.event.MouseListener 
34  {
35  
36  }
37  
38  final class InputValidClassDefIndent4
39      extends java.awt.event.MouseAdapter 
40      implements java.awt.event.MouseListener 
41  {
42  
43  }
44  
45  final 
46  class InputValidClassDefIndent4a
47      extends java.awt.event.MouseAdapter 
48      implements java.awt.event.MouseListener 
49  {
50  
51  }
52  
53  final class InputValidClassDefIndent5 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener 
54  {
55  
56  }
57  
58  final class InputValidClassDefIndent6 extends java.awt.event.MouseAdapter implements java.awt.event.MouseListener {
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().addActionListener(new ActionListener() 
94          {
95              public void actionPerformed(ActionEvent e) {
96                  
97              }
98          });
99  
100         
101         new JButton().addActionListener(new ActionListener() {
102             public void actionPerformed(ActionEvent e) {
103                 int i = 2;
104             }
105         });
106         
107         Object o = new ActionListener() 
108         {
109             public void actionPerformed(ActionEvent 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     }
122     
123     private void myfunc2(int a, int b, int c, int d, int e, int f, int g) {
124     }
125     
126     private int myfunc3(int a, int b, int c, int d) {
127         return 1;
128     }
129 }