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 java.util.ArrayList;
24 import java.util.Collection;
25 import java.util.EnumSet;
26 import java.util.HashMap;
27 import java.util.HashSet;
28 import java.util.LinkedHashMap;
29 import java.util.LinkedHashSet;
30 import java.util.List;
31 import java.util.Map;
32 import java.util.Optional;
33 import java.util.OptionalDouble;
34 import java.util.OptionalInt;
35 import java.util.OptionalLong;
36 import java.util.Set;
37 import java.util.stream.DoubleStream;
38 import java.util.stream.IntStream;
39 import java.util.stream.LongStream;
40 import java.util.stream.Stream;
41
42 import javax.naming.NamingException;
43
44 public class InputClassFanOutComplexity3 {
45 private class InnerClass {
46 public List _list = new ArrayList();
47 }
48
49 private class AnotherInnerClass {
50 public String _string = "";
51 }
52
53 public Set _set = new HashSet();
54 public Map _map = new HashMap();
55 public String _string = "";
56 public int[] _intArray = new int[0];
57 public InnerClass _innerClass = new InnerClass();
58 public AnotherInnerClass _anotherInnerClass = new AnotherInnerClass();
59
60 public void foo() throws NamingException {
61 }
62
63 }
64
65 enum InnerEnum3 {
66 VALUE1;
67
68 private InnerEnum3()
69 {
70 map2 = new HashMap();
71 }
72 private Set map1 = new HashSet();
73 private Map map2;
74 }
75
76 class InputThrows3 {
77
78 public void get() throws NamingException, IllegalArgumentException {
79 new java.lang.ref.ReferenceQueue<Integer>();
80 }
81 }
82
83 class InputMultiDimensionalArray3 {
84 public Object[][] get() {
85 return new Object[][]{};
86 }
87 }
88
89 class InputCollectionsExt3 {
90 private Collection col;
91 private EnumSet enumSet;
92 private LinkedHashMap map;
93 private LinkedHashSet set;
94 }
95
96 class InputOptionals3 {
97 private Optional<Long> op1;
98 private OptionalInt op2;
99 private OptionalLong op3;
100 private OptionalDouble op4;
101 }
102
103 class InputStreams3 {
104 private Stream s1;
105 private IntStream s2;
106 private LongStream s3;
107 private DoubleStream s4;
108 }