merge @JetProperty and @JetMethod

because:
* have common parts
* reduce class size

Also add helper JetMethodAnnotationWriter class

And also do not generate @Jet* annotations for closures
This commit is contained in:
Stepan Koltsov
2012-01-13 23:56:13 +04:00
parent 6603a431fa
commit 133fc683a4
16 changed files with 177 additions and 164 deletions
@@ -17,6 +17,11 @@ import java.lang.annotation.Target;
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface JetMethod {
int KIND_REGULAR = 0;
int KIND_PROPERTY = 1;
int kind() default KIND_REGULAR;
/**
* @return type projections or empty
*/
@@ -37,4 +42,10 @@ public @interface JetMethod {
* Return type type unless java type is correct Kotlin type.
*/
String returnType () default "";
/**
* If this is property.
* @return
*/
String propertyType() default "";
}
@@ -1,17 +0,0 @@
package jet.runtime.typeinfo;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @author Stepan Koltsov
*/
@Target({ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface JetProperty {
String type() default "";
String typeParameters() default "";
}