1090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/*
21d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * Copyright (C) 2009 The Guava Authors
3090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson *
4090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Licensed under the Apache License, Version 2.0 (the "License");
5090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * you may not use this file except in compliance with the License.
6090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * You may obtain a copy of the License at
7090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson *
8090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * http://www.apache.org/licenses/LICENSE-2.0
9090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson *
10090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * Unless required by applicable law or agreed to in writing, software
11090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * distributed under the License is distributed on an "AS IS" BASIS,
12090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * See the License for the specific language governing permissions and
14090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * limitations under the License.
15090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */
16090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson
17090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonpackage com.google.common.annotations;
18090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson
191d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringertimport java.lang.annotation.Documented;
20090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport java.lang.annotation.ElementType;
21090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport java.lang.annotation.Retention;
22090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport java.lang.annotation.RetentionPolicy;
23090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonimport java.lang.annotation.Target;
24090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson
25090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson/**
26090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * The presence of this annotation on a method indicates that the method may
27090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * <em>not</em> be used with the
28090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * <a href="http://code.google.com/webtoolkit/">Google Web Toolkit</a> (GWT),
29090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * even though its type is annotated as {@link GwtCompatible} and accessible in
30090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * GWT.  They can cause GWT compilation errors or simply unexpected exceptions
31090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * when used in GWT.
32090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson *
331d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * <p>Note that this annotation should only be applied to methods, fields, or
341d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert * inner classes of types which are annotated as {@link GwtCompatible}.
35090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson *
36090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson * @author Charles Fry
37090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson */
38090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson@Retention(RetentionPolicy.CLASS)
391d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.FIELD })
401d580d0f6ee4f21eb309ba7b509d2c6d671c4044Bjorn Bringert@Documented
41090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson@GwtCompatible
42090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilsonpublic @interface GwtIncompatible {
43090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson
44090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson  /**
45090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson   * Describes why the annotated element is incompatible with GWT. Since this is
46090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson   * generally due to a dependence on a type/method which GWT doesn't support,
47090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson   * it is sufficient to simply reference the unsupported type/method. E.g.
48090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson   * "Class.isInstance".
49090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson   */
50090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson  String value();
51090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson
52090f9b4c879985bc747c214f82c62471e60c7742Jesse Wilson}
53