001/*
002 * Copyright 2010-2013 JetBrains s.r.o.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package jet.runtime.typeinfo;
018
019import java.lang.annotation.ElementType;
020import java.lang.annotation.Retention;
021import java.lang.annotation.RetentionPolicy;
022import java.lang.annotation.Target;
023
024/**
025 * Annotation for method
026 *
027 * The fact of receiver presence must be deducted from presence of '$receiver' parameter
028 *
029 * @url http://confluence.jetbrains.net/display/JET/Jet+Signatures
030 */
031@Target({ElementType.METHOD})
032@Retention(RetentionPolicy.RUNTIME)
033public @interface JetMethod {
034    /**
035     * See CallableMemberDescriptor.Kind
036     * @deprecated See JvmStdlibNames - now kind is kept in flags
037     * @return kind of this method
038     */
039    int kind() default 0;
040
041    /**
042     * See JvmStdlibNames
043     * @return flags for method
044     */
045    int flags() default 0;
046    
047    /**
048     * @deprecated not used any more
049     * @return type projections or empty
050     */
051    JetTypeProjection[] returnTypeProjections() default {};
052
053    /**
054     * Serialized method type parameters.
055     * @return
056     */
057    String typeParameters() default "";
058
059    /**
060     * @deprecated - now it kept in flags
061     * @return is this type returnTypeNullable
062     */
063    boolean nullableReturnType() default false;
064
065    /**
066     * Return type type unless java type is correct Kotlin type.
067     */
068    String returnType () default "";
069
070    /**
071     * If this is property.
072     * @return
073     */
074    String propertyType() default "";
075}