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