View Javadoc
1   /*
2   JavadocMethod
3   allowedAnnotations = (default)Override
4   validateThrows = (default)false
5   accessModifiers = (default)public, protected, package, private
6   allowMissingParamTags = (default)false
7   allowMissingReturnTag = (default)false
8   tokens = (default)METHOD_DEF, CTOR_DEF, ANNOTATION_FIELD_DEF, COMPACT_CTOR_DEF
9   
10  
11  */
12  
13  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
14  
15  import java.awt.event.MouseEvent;
16  import java.awt.event.MouseAdapter;
17  import javax.swing.JButton;
18  
19  public class InputJavadocMethodScopeAnonInner
20  {
21      /**
22         button.
23      */
24      private JButton mButton = new JButton(); // ok
25  
26      /**
27         anon inner in member variable initialization.
28      */
29      private Runnable mRunnable = new Runnable() { // ok
30          public void run() // should not have to be documented, class is anon.
31          {
32              System.identityHashCode("running");
33          }
34      };
35  
36      /**
37         anon inner in constructor.
38      */
39      InputJavadocMethodScopeAnonInner() // ok
40      {
41          mButton.addMouseListener( new MouseAdapter()
42              {
43                  public void mouseClicked( MouseEvent aEv )
44                  {
45                      System.identityHashCode("click");
46                  }
47              } );
48      }
49  
50      /**
51         anon inner in method
52      */
53      public void addInputAnonInner() // ok
54      {
55          mButton.addMouseListener( new MouseAdapter()
56              {
57                  public void mouseClicked( MouseEvent aEv )
58                  {
59                      System.identityHashCode("click");
60                  }
61              } );
62      }
63  }