Compiler Error J0221

The @com attribute on member 'identifier' cannot be used in this type of class or interface

The compiler detected that an @com declaration was placed on a member of a class or method but because of the type of @com attribute used with the class or interface, it is not allowed. This error can occur in the following situations:

The following example illustrates this error:

/**@com.struct()*/
class Simple{
   /**@com.method(dispid=777)*/
   public native void method1();
   /*error: cannot use @com.method inside of
            @com.struct*/
}