View Javadoc
1   /*xml
2   <module name="Checker">
3     <module name="TreeWalker">
4       <module name="ClassDataAbstractionCoupling">
5         <property name="excludedPackages" value="com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore"/>
6       </module>
7     </module>
8   </module>
9   */
10  
11  package com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling;
12  
13  // xdoc section -- start
14  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.Example7;
15  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.Example8;
16  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.Example9;
17  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.deeper.Example4;
18  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.deeper.Example5;
19  import com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling.ignore.deeper.Example6;
20  
21  class Example11 {
22    // Ignored, located inside classdataabstractioncoupling.ignore package
23    Example7 example7 = new Example7();
24    Example8 example8 = new Example8();
25    Example9 example9 = new Example9();
26  
27    // Counted, located outside of classdataabstractioncoupling.ignore package
28    Example1 example1 = new Example1();
29    Example2 example2 = new Example2();
30    Example3 example3 = new Example3();
31    Example4 example4 = new Example4();
32    Example5 example5 = new Example5();
33    Example6 example6 = new Example6();
34    Data data = new Data(); // Counted 7
35  
36    class Data {
37      public Data() {
38        Example11 example11 = new Example11(); // Ignored same file
39      }
40    }
41  }
42  // xdoc section -- end