@@ -0,0 +1,1949 @@
+/*%0A * Copyright 2000-2013 JetBrains s.r.o.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.jetbrains.annotations;%0A%0Aimport java.lang.annotation.*;%0A%0A/**%0A * Specifies some aspects of the method behavior depending on the arguments. Can be used by tools for advanced data flow analysis.%3Cp%3E%0A * %0A * Method contract has the following syntax:%3Cbr/%3E%0A *  contract ::= args '-%3E' effect%3Cbr/%3E%0A *  args ::= ((arg ,)* arg )?%3Cbr/%3E%0A *  arg ::= value-constraint%3Cbr/%3E%0A *  value-constraint ::= 'any' %7C 'null' %7C '!null' %7C 'false' %7C 'true'%3Cbr/%3E%0A *  effect ::= value-constraint %7C 'fail' %7C 'exit'%3Cp/%3E%0A *  %0A * The constraints denote the following:%3Cbr/%3E%0A * %3Cul%3E%0A * %3Cli%3E any - any value%0A * %3Cli%3E null - null value%0A * %3Cli%3E !null - a value statically proved to be not-null%0A * %3Cli%3E true - true boolean value%0A * %3Cli%3E false - false boolean value%0A * %3Cli%3E fail - the method throws exception, if the arguments satisfy argument constraints%0A * %3Cli%3E exit - the method terminates the current process, if the arguments satisfy argument constraints%0A * %3C/ul%3E%0A * Examples:%3Cp/%3E%0A * %3Ccode%3E@Contract(%22any, null -%3E null%22)%3C/code%3E - method returns null if its second argument is null%3Cbr/%3E%0A * %3Ccode%3E@Contract(%22true -%3E fail%22)%3C/code%3E - a typical assertFalse method which throws an exception if %3Ccode%3Etrue%3C/code%3E is passed to it%3Cbr/%3E %0A * %0A * @author peter%0A */%0A@Documented%0A@Retention(RetentionPolicy.SOURCE)%0A@Target(ElementType.METHOD)%0Apublic @interface Contract %7B%0A  String value();%0A%7D%0A

add @Contract annotation (IDEA-93372)