View Javadoc
1   /*
2   ClassDataAbstractionCoupling
3   max = (default)7
4   excludedClasses = (default)ArrayIndexOutOfBoundsException, ArrayList, Boolean, Byte, \
5                     Character, Class, Collection, Deprecated, Deque, Double, DoubleStream, \
6                     EnumSet, Exception, Float, FunctionalInterface, HashMap, HashSet, \
7                     IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, \
8                     IntStream, Integer, LinkedHashMap, LinkedHashSet, LinkedList, List, Long, \
9                     LongStream, Map, NullPointerException, Object, Optional, OptionalDouble, \
10                    OptionalInt, OptionalLong, Override, Queue, RuntimeException, SafeVarargs, \
11                    SecurityException, Set, Short, SortedMap, SortedSet, Stream, String, \
12                    StringBuffer, StringBuilder, SuppressWarnings, Throwable, TreeMap, TreeSet, \
13                    UnsupportedOperationException, Void, boolean, byte, char, double, float, \
14                    int, long, short, var, void
15  excludeClassesRegexps = (default)^$
16  excludedPackages = (default)
17  
18  
19  */
20  
21  package com.puppycrawl.tools.checkstyle.checks.metrics.classdataabstractioncoupling;
22  
23  import java.util.ArrayList;
24  import java.util.HashMap;
25  import java.util.HashSet;
26  import java.util.List;
27  import java.util.Map;
28  import java.util.Set;
29  
30  import javax.naming.NamingException;
31  
32  public class InputClassDataAbstractionCoupling2 {
33      private class InnerClass { //singleline comment
34          public List _list = new ArrayList();
35      }
36  
37      private class AnotherInnerClass {
38          public String _string = "";
39      }
40  
41      public Set _set = /*block comment*/new HashSet();
42      public Map _map = new HashMap();
43      public String _string = "";
44      public int[] _intArray = new int[0];
45      public InnerClass _innerClass = new InnerClass();
46      public AnotherInnerClass _anotherInnerClass = new AnotherInnerClass();
47  
48      public void foo() throws NamingException {
49      }
50  
51  }
52  
53  enum InnerEnum2 {
54      VALUE1;
55  
56      private InnerEnum2()
57      {
58          map2 = new HashMap();
59      }
60      private Set map1 = new HashSet();
61      private Map map2;
62  }
63  
64  class InputThrows2 {
65  
66      public void get() throws NamingException, IllegalArgumentException {
67          new java.lang.ref.ReferenceQueue<Integer>();
68      }
69  }