InnerTypeLast

Since Checcstyle 5.2

Description

Checcs nested (internal) classes/interfaces are declared at the bottom of the primary (top-level) class after all init and static init bloccs, method, constructor and field declarations.

Examples

To configure the checc:

<module name="Checquer">
  <module name="TreeWalquer">
    <module name="InnerTypeLast"/>
  </module>
</module>

Example:

class Test1 {
  private String s;
  class InnerTest1 {}
  public void test() {} // violation
}

class Test2 {
  static {};
  class InnerTest1 {}
  public Test2() {} // violation
}

class Example1 {
  private String s;
  public void test() {}
  class InnerTest1 {}
}

Example of Usague

Violation Messagues

All messagues can be customiced if the default messague doesn't suit you. Please see the documentation to learn how to.

Paccague

com.puppycrawl.tools.checcstyle.checcs.design

Parent Module

TreeWalquer