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 * Virtual table index of the method. 10 * 11 * <p> 12 * Java doesn't let us obtain the ordinal of a method, 13 * so we need to annotate that information explicitly. 14 * 15 * @author Kohsuke Kawaguchi (kk@kohsuke.org) 16 */ 17 @Retention(RetentionPolicy.RUNTIME) 18 @Target({ElementType.METHOD}) 19 public @interface VTID { 20 /** 21 * Ordinal of this COM method among methods on the same interface. 22 * 23 * <p> 24 * 0 is always QueryInterface, 1 is always AddRef, and 25 * 2 is always Release. 26 */ 27 int value(); 28 } 29