View Javadoc
1   /*
2    * Copyright (C) 2009 The Guava Authors
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.puppycrawl.tools.checkstyle.checks.javadoc.javadocmethod;
18  
19  import com.google.common.collect.Multiset;
20  import com.google.common.collect.Multiset.Entry;
21  
22  import java.lang.reflect.Method;
23  import java.util.Arrays;
24  import java.util.ConcurrentModificationException;
25  import java.util.Iterator;
26  import java.util.List;
27  
28  /**
29   * Common superclass for {@link MultisetSetCountUnconditionallyTester} and
30   * {@link MultisetSetCountConditionallyTester}. It is used by those testers to
31   * test calls to the unconditional {@code setCount()} method and calls to the
32   * conditional {@code setCount()} method when the expected present count is
33   * correct.
34   *
35   * @author Chris Povirk
36   */
37  @SuppressWarnings(value = "unchecked")
38  public abstract class InputJavadocMethodExtendAnnotation<E>
39    {
40  
41    private static final String SUPPORTS_ADD = "";
42    private static final String SUPPORTS_REMOVE = null;
43  
44  @CollectionFeature.Require
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  }