1
2
3
4
5
6
7
8
9
10
11 package com.puppycrawl.tools.checkstyle.checks.coding.variabledeclarationusagedistance;
12
13 import java.awt.event.ActionListener;
14 import java.awt.event.ActionEvent;
15 import javax.swing.JMenuItem;
16
17 public class InputVariableDeclarationUsageDistanceAnonymous {
18 public void method() {
19 JMenuItem prefs = new JMenuItem("Preferences...");
20
21 nothing();
22 nothing();
23 nothing();
24 prefs.addActionListener(new ActionListener() {
25 public void actionPerformed(ActionEvent e) {
26 }
27 });
28 }
29
30 public void nothing() {
31 }
32 }