001/*
002 * Copyright (C) 2009 The Guava Authors
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
005 * in compliance with the License. You may obtain a copy of the License at
006 *
007 * http://www.apache.org/licenses/LICENSE-2.0
008 *
009 * Unless required by applicable law or agreed to in writing, software distributed under the License
010 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
011 * or implied. See the License for the specific language governing permissions and limitations under
012 * the License.
013 */
014
015package com.google.common.annotations;
016
017import java.lang.annotation.Documented;
018import java.lang.annotation.ElementType;
019import java.lang.annotation.Retention;
020import java.lang.annotation.RetentionPolicy;
021import java.lang.annotation.Target;
022
023/**
024 * The presence of this annotation on an API indicates that the method may <em>not</em> be used with
025 * the <a href="http://www.gwtproject.org/">Google Web Toolkit</a> (GWT).
026 *
027 * <p>This annotation behaves identically to <a href=
028 * "http://www.gwtproject.org/javadoc/latest/com/google/gwt/core/shared/GwtIncompatible.html">the
029 * {@code @GwtIncompatible} annotation in GWT itself</a>.
030 *
031 * @author Charles Fry
032 */
033@Retention(RetentionPolicy.CLASS)
034@Target({ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD})
035@Documented
036@GwtCompatible
037public @interface GwtIncompatible {
038  /**
039   * Describes why the annotated element is incompatible with GWT. Since this is generally due to a
040   * dependence on a type/method which GWT doesn't support, it is sufficient to simply reference the
041   * unsupported type/method. E.g. "Class.isInstance".
042   *
043   * <p>As of Guava 20.0, this value is optional. We encourage authors who wish to describe why an
044   * API is {@code @GwtIncompatible} to instead leave an implementation comment.
045   */
046  String value() default "";
047}