View Javadoc

1   /* Copyright (c) 2008 Sascha Kohlmann
2    *
3    * This program is free software: you can redistribute it and/or modify
4    * it under the terms of the GNU Affero General Public License as published by
5    * the Free Software Foundation, either version 3 of the License, or
6    * (at your option) any later version.
7    *
8    * This program is distributed in the hope that it will be useful,
9    * but WITHOUT ANY WARRANTY; without even the implied warranty of
10   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11   * GNU Affero General Public License for more details.
12   *
13   * You should have received a copy of the GNU Affero General Public License
14   * along with this program. If not, see <http://www.gnu.org/licenses/>.
15   */
16  package net.sf.eos;
17  
18  import static java.lang.annotation.ElementType.METHOD;
19  import static java.lang.annotation.RetentionPolicy.RUNTIME;
20  
21  import java.lang.annotation.Documented;
22  import java.lang.annotation.Retention;
23  import java.lang.annotation.Target;
24  import java.util.Iterator;
25  
26  /**
27   * Annotates a method as unsupported. Useful for example
28   * {@link Iterator} instances which doesn't support the
29   * {@link Iterator#remove()} method.
30   *
31   * <p>Such an annotated method should throw a
32   * {@link UnsupportedOperationException}.</p>
33   *
34   * <p><strong>Note:</strong> experimental</p>
35   *
36   * @since 0.1.0
37   * @author Sascha Kohlmann
38   */
39  @Experimental
40  @Documented
41  @Retention(value=RUNTIME)
42  @Target(value=METHOD)
43  public @interface Unsupported { }