View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="OverloadMethodsDeclarationOrder"/>
5     </module>
6   </module>
7   */
8   package com.puppycrawl.tools.checkstyle.checks.coding.overloadmethodsdeclarationorder;
9   
10  // xdoc section -- start
11  class Example1 {
12    void same(int i) {}
13    // comments between overloaded methods are allowed.
14    void same(String s) {}
15    void same(String s, int i) {}
16    void same(int i, String s) {}
17    void notSame() {}
18    interface notSame{}
19  
20    void otherSame(String s) {}
21    void foo() {}
22    // violation below, 'All overloaded methods should be placed next to each other'
23    void otherSame(String s, int i) {}
24  }
25  // xdoc section -- end