31 import java.lang.annotation.Target; 32 33 /** 34 * Specifies a specific method to be the JavaScript "constructor" function. 35 */ 36 @Retention(RetentionPolicy.RUNTIME) 37 @Target(ElementType.METHOD) 38 public @interface Constructor { 39 /** 40 * @return the name of the constructor function. If empty, the name is 41 * inferred. 42 */ 43 public String name() default ""; 44 45 /** 46 * @return the arity of the function. By default computed from the method 47 * signature. Note that -1 means varargs. So, -2 is used as invalid 48 * arity. 49 */ 50 public int arity() default -2; 51 } | 31 import java.lang.annotation.Target; 32 33 /** 34 * Specifies a specific method to be the JavaScript "constructor" function. 35 */ 36 @Retention(RetentionPolicy.RUNTIME) 37 @Target(ElementType.METHOD) 38 public @interface Constructor { 39 /** 40 * @return the name of the constructor function. If empty, the name is 41 * inferred. 42 */ 43 public String name() default ""; 44 45 /** 46 * @return the arity of the function. By default computed from the method 47 * signature. Note that -1 means varargs. So, -2 is used as invalid 48 * arity. 49 */ 50 public int arity() default -2; 51 52 /** 53 * @return the documentation string for this constructor. 54 */ 55 public String documentation() default ""; 56 } |