View Javadoc
1   /*
2   ClassFanOutComplexity
3   max = 0
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  // someexamples of 1.5 extensions
22  package com.puppycrawl.tools.checkstyle.checks.metrics.classfanoutcomplexity;
23  
24  @interface MyAnnotation1 {
25      String name();
26      int version();
27  }
28  
29  @MyAnnotation1(name = "ABC", version = 1) // violation
30  public class InputClassFanOutComplexity15Extensions
31  {
32  
33  }
34  
35  enum Enum1
36  {
37      A, B, C;
38      Enum1() {}
39      public String toString() {
40          return ""; //some custom implementation
41      }
42  }
43  
44  interface TestRequireThisEnum
45  {
46      enum DAY_OF_WEEK
47      {
48          SUNDAY,
49          MONDAY,
50          TUESDAY,
51          WEDNESDAY,
52          THURSDAY,
53          FRIDAY,
54          SATURDAY
55      }
56  }