[Checkers] QualifierRoot

Telmo telmo at MIT.EDU
Wed Jun 11 16:27:05 EDT 2008


> 1. Have an empty list for @SubtypeOf({ /* empty */ }), downside: cannot 
> specify a qualifier being a subtype of unqualified and something else
>
> 2. Have a non-annotation class, e.g. Void.class; so Interned would be 
> @SubtypeOf({Void.class}).  But it it would be nice to make SubtypeOf accept 
> class<? extends Annotation>.

I prefer the approach 2, having an annotation that counts as 
non-annotation. Can't we create a @Unqualified annotation that is seen on 
AnnotatedTypeMirrors by default if it doesn't contain any annotations?


> __Javari QReadOnly and ReadOnly__
> Telmo, can you please confirm that ReadOnly is not a subtype of QReadOnly.
>
> To my understanding, ReadOnly is a subtype of QReadOnly only within a type 
> argument comparison (e.g. List<@ReadOnly Date> a subtype of List<@QReadOnly 
> Date>), but not in any other context.  Can you confirm that the following 
> code is invalid in Javari:
>
> List<@QReadOnly Date> l = ...;
> @ReadOnly Date roDate = ...;
> lst.add(roDate); // invalid

I believed the code above would be valid. I'm not sure about the current 
framework behavior with regards to that.



More information about the checkers mailing list