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