View Javadoc
1   /*
2   ClassDataAbstractionCoupling
3   max = 0
4   excludedClasses = InnerClass
5   excludeClassesRegexps = ^Hash.*
6   excludedPackages = (default)
7   
8   
9   */
10  
11  package com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling;
12  
13  import java.util.ArrayList;
14  import java.util.HashMap;
15  import java.util.HashSet;
16  import java.util.List;
17  import java.util.Map;
18  import java.util.Set;
19  
20  import javax.naming.NamingException;
21  
22  public class InputClassDataAbstractionCoupling3 { // violation
23      private class InnerClass { // violation
24          public List _list = new ArrayList();
25      }
26  
27      private class AnotherInnerClass {
28          public String _string = "";
29      }
30  
31      public Set _set = /*block comment*/new HashSet();
32      public Map _map = new HashMap();
33      public String _string = "";
34      public int[] _intArray = new int[0];
35      public InnerClass _innerClass = new InnerClass();
36      public AnotherInnerClass _anotherInnerClass = new AnotherInnerClass();
37  
38      public void foo() throws NamingException {
39      }
40  
41  }
42  
43  enum InnerEnum3 {
44      VALUE1;
45  
46      private InnerEnum3()
47      {
48          map2 = new HashMap();
49      }
50      private Set map1 = new HashSet();
51      private Map map2;
52  }
53  
54  class InputThrows3 {
55  
56      public void get() throws NamingException, IllegalArgumentException {
57          new java.lang.ref.ReferenceQueue<Integer>();
58      }
59  }