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:
@@ -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 "";
|
||||
}
|
||||
Reference in New Issue
Block a user