View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="MissingOverride"/>
5     </module>
6   </module>
7   */
8   
9   package com.puppycrawl.tools.checkstyle.checks.annotation.missingoverride;
10  
11  class ParentClass1{
12    public void test1(){}
13  
14    public void test2(){}
15  
16  }
17  // xdoc section -- start
18  class Example1 extends ParentClass1 {
19  
20    /** {@inheritDoc} */
21    @Override
22    public void test1() { // OK
23  
24    }
25  
26    /** {@inheritDoc} */
27    public void test2() { // violation, 'include @java.lang.Override'
28  
29    }
30  
31    /** {@inheritDoc} */
32    // violation below '{@inheritDoc} tag is not valid at this location.'
33    private void test3() {
34  
35    }
36  
37    /** {@inheritDoc} */
38    // violation below '{@inheritDoc} tag is not valid at this location.'
39    public static void test4() {
40  
41    }
42  }
43  // xdoc section -- end