View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="DesignForExtension"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.design.designforextension;
9   
10  // xdoc section -- start
11  public abstract class Example1 {
12    private int bar;
13  
14    public int m1() {return 2;}  // violation
15  
16    public int m2() {return 8;}  // violation
17  
18    private void m3() {m4();}  // OK. Private method.
19  
20    protected void m4() { }  // OK. No implementation.
21  
22    public abstract void m5();  // OK. Abstract method.
23  
24    /**
25     * This implementation ...
26     @return some int value.
27     */
28    public int m6() {return 1;}  // OK. Have javadoc on overridable method.
29  
30    /**
31     * Some comments ...
32     */
33    public int m7() {return 1;}  // OK. Have javadoc on overridable method.
34  
35    /**
36     * This
37     * implementation ...
38     */
39    public int m8() {return 2;}  // OK. Have javadoc on overridable method.
40  
41    @Override                   // violation
42    public String toString() {
43      return "";
44    }
45  }
46  // xdoc section -- end