1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package com.puppycrawl.tools.checkstyle.checks.metrics.classfanoutcomplexity;
22
23 import javax.naming.*;
24 import java.util.*;
25 import java.util.stream.*;
26
27 public class InputClassFanOutComplexity {
28 private class InnerClass {
29 public List _list = new ArrayList();
30 }
31
32 private class AnotherInnerClass {
33 public String _string = "";
34 }
35
36 public Set _set = new HashSet();
37 public Map _map = new HashMap();
38 public String _string = "";
39 public int[] _intArray = new int[0];
40 public InnerClass _innerClass = new InnerClass();
41 public AnotherInnerClass _anotherInnerClass = new AnotherInnerClass();
42
43 public void foo() throws NamingException {
44 }
45
46 }
47
48 enum InnerEnum {
49 VALUE1;
50
51 private InnerEnum()
52 {
53 map2 = new HashMap();
54 }
55 private Set map1 = new HashSet();
56 private Map map2;
57 }
58
59 class InputThrows {
60
61 public void get() throws NamingException, IllegalArgumentException {
62 new java.lang.ref.ReferenceQueue<Integer>();
63 }
64 }
65
66 class InputMultiDimensionalArray {
67 public Object[][] get() {
68 return new Object[][]{};
69 }
70 }
71
72 class InputCollectionsExt {
73 private Collection col;
74 private EnumSet enumSet;
75 private LinkedHashMap map;
76 private LinkedHashSet set;
77 }
78
79 class InputOptionals {
80 private Optional<Long> op1;
81 private OptionalInt op2;
82 private OptionalLong op3;
83 private OptionalDouble op4;
84 }
85
86 class InputStreams {
87 private Stream s1;
88 private IntStream s2;
89 private LongStream s3;
90 private DoubleStream s4;
91 }