1
2
3
4
5
6
7
8 package com.puppycrawl.tools.checkstyle.checks.sizes.anoninnerlength;
9
10 import java.awt.event.MouseAdapter;
11 import java.awt.event.MouseEvent;
12
13 import javax.swing.JButton;
14
15
16
17
18
19
20 public class InputAnonInnerLength2
21 {
22
23
24
25 private JButton mButton = new JButton();
26
27 private class MyInner
28 {
29 private MyInner(int[] anArray)
30 {
31 }
32 }
33
34
35
36
37
38
39 private MyInner myInner = new MyInner(new int[]{
40
41 1,
42 2,
43 3,
44 4,
45 5,
46 6,
47 7,
48 }
49 );
50
51
52
53
54 private Runnable mRunnable1 = new Runnable() {
55 public void run()
56 {
57 System.identityHashCode("running");
58 System.identityHashCode("running");
59 System.identityHashCode("running");
60 System.identityHashCode("running");
61 System.identityHashCode("running");
62 System.identityHashCode("running");
63 System.identityHashCode("running");
64 System.identityHashCode("running");
65 System.identityHashCode("running");
66 System.identityHashCode("running");
67 System.identityHashCode("running");
68 System.identityHashCode("running");
69 System.identityHashCode("running");
70 System.identityHashCode("running");
71 System.identityHashCode("running");
72 System.identityHashCode("running");
73 }
74 };
75
76
77
78
79 private Runnable mRunnable2 = new Runnable() {
80 public void run()
81 {
82 System.identityHashCode("running");
83 System.identityHashCode("running");
84 System.identityHashCode("running");
85 System.identityHashCode("running");
86 System.identityHashCode("running");
87 System.identityHashCode("running");
88 System.identityHashCode("running");
89 System.identityHashCode("running");
90 System.identityHashCode("running");
91 System.identityHashCode("running");
92 System.identityHashCode("running");
93 System.identityHashCode("running");
94 System.identityHashCode("running");
95 System.identityHashCode("running");
96 System.identityHashCode("running");
97 }
98 };
99
100
101
102
103 InputAnonInnerLength2()
104 {
105 mButton.addMouseListener( new MouseAdapter()
106 {
107 public void mouseClicked( MouseEvent aEv )
108 {
109 System.identityHashCode("click");
110 }
111 } );
112 }
113
114
115
116
117 public void addInputAnonInner()
118 {
119 mButton.addMouseListener( new MouseAdapter()
120 {
121 public void mouseClicked( MouseEvent aEv )
122 {
123 System.identityHashCode("click");
124 }
125 } );
126 }
127 }