1 package com4j; 2 3 import java.lang.annotation.ElementType; 4 import java.lang.annotation.Retention; 5 import java.lang.annotation.RetentionPolicy; 6 import java.lang.annotation.Target; 7 8 /** 9 * Specifies which method parameter in the COM method 10 * is used as the return value 11 * 12 * @author Kohsuke Kawaguchi (kk@kohsuke.org) 13 */ 14 @Retention(RetentionPolicy.RUNTIME) 15 @Target({ElementType.METHOD}) 16 public @interface ReturnValue { 17 /** 18 * The index of the parameter with [retval] marker. 19 * 20 * <p> 21 * If 0, the retval parameter is the 1st parameter in the parameter list. 22 * 23 * <p> 24 * The default value '-1' means the return value is the last parameter. 25 */ 26 int index() default -1; 27 28 /** 29 * True if the parameter is "in/out" (therefore it shows up in the 30 * Java parameter list.) Otherwise, the return value is not a part of the 31 * Java parameter list. 32 */ 33 boolean inout() default false; 34 35 /** 36 * The native type to be unmarshalled. 37 */ 38 NativeType type() default NativeType.Default; 39 } 40