1 /*xml 2 <module name="Checker"> 3 <module name="TreeWalker"> 4 <module name="ClassDataAbstractionCoupling"> 5 <property name="max" value="2"/> 6 </module> 7 </module> 8 </module> 9 */ 10 11 package com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling; 12 13 import java.util.Map; 14 import java.util.HashMap; 15 import java.util.Set; 16 import java.util.HashSet; 17 import java.time.Instant; 18 import java.time.LocalTime; 19 20 // xdoc section -- start 21 public class Example3 { 22 Set set = new HashSet(); // Ignored by default 23 Map map = new HashMap(); // Ignored by default 24 Instant instant = Instant.now(); // Counted 1 25 LocalTime localTime = LocalTime.now(); // Counted 2 26 } 27 // xdoc section -- end