View Javadoc
1   /*
2   MissingJavadocMethod
3   minLineCount = 2
4   allowedAnnotations = MyAnnotation, Override
5   scope = private
6   excludeScope = (default)null
7   allowMissingPropertyJavadoc = (default)false
8   ignoreMethodNamesRegex = (default)null
9   tokens = (default)METHOD_DEF , CTOR_DEF , ANNOTATION_FIELD_DEF , COMPACT_CTOR_DEF
10  
11  
12  */
13  
14  package com.puppycrawl.tools.checkstyle.checks.javadoc.missingjavadocmethod;
15  
16  import com.google.common.collect.Multiset;
17  import com.google.common.collect.Multiset.Entry;
18  
19  import java.lang.reflect.Method;
20  import java.util.Arrays;
21  import java.util.ConcurrentModificationException;
22  import java.util.Iterator;
23  import java.util.List;
24  
25  /* Config:
26   * allowedAnnotations = "MyAnnotation, Override"
27   * scope = "private"
28   * minLineCount = "2"
29   */
30  /**
31   * Common superclass for {@link MultisetSetCountUnconditionallyTester} and
32   * {@link MultisetSetCountConditionallyTester}. It is used by those testers to
33   * test calls to the unconditional {@code setCount()} method and calls to the
34   * conditional {@code setCount()} method when the expected present count is
35   * correct.
36   */
37  @SuppressWarnings(value = "unchecked")
38  public abstract class InputMissingJavadocMethodExtendAnnotation<E>
39    {
40  
41    private static final String SUPPORTS_ADD = "";
42    private static final String SUPPORTS_REMOVE = null;
43  
44  @CollectionFeature.Require // violation
45    public void testSetCount_zeroToZero_unsupported() {
46      try {
47        assertZeroToZero();
48      } catch (UnsupportedOperationException tolerated) {
49      }
50    }
51  
52    private void assertZeroToZero() {
53  
54    }
55  
56    @interface CollectionFeature {
57        @interface Require {
58        }
59    }
60  }