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