[JSR308] An implementation of Subtyping for Annotations

Michael Ernst mernst at cs.washington.edu
Tue Sep 1 16:44:03 EDT 2009


Christian-

Thanks for the clarification.  I didn't understand what you wanted to be
done with the patch, or your view of its status.  But it sounds like we are
on the same page.  I'll assume you don't need any specific feedback unless
you state otherwise.

> > Suppose that annotation types Sub1 and Sub2 are direct subtypes of Super,
> > whose value field has type int.
> we disallow subtypes of 
> annotation types to "redefine" fields that have already been defined in 
> their supertypes. In your example, this means that a subtype @Sub1 of 
> @Super cannot have a "value" field, if @Super already has a "value" field.

I think there is a misunderstanding, because my example had no redefinition
of fields.  Maybe I should have stated my example like this:

  Suppose that annotation types Sub1 and Sub2 are direct subtypes of Super,
  and Super has a value field of type int.

(Sorry for any confusion.)

I would expect that if Sub1 is a subtype of Super, then it is legal to
specify the value of any of Super's fields.

Thanks again.

                    -Mike



More information about the JSR308 mailing list