[Checkers] romaybe => ropoly?

Mahmood Ali mahmood at MIT.EDU
Sun Apr 6 14:08:53 EDT 2008


> And if a similar mechanism were introduced in, for example, the
> nonnull checker, it would be "nnpoly" instead of "nnmaybe".

I have been thinking about this issue for a bit.  It seems that all  
checkers could actually benefit from polymorphism over type  
qualifiers, and not just IGJ and Javari.  Specifically, in the case of  
method whose return type is dependent on the method arguments (e.g.  
consider: @Poly X getSame(@Poly X x) {return x; }).

Do we have a sense on how much Interned and NonNull need something  
like this?  Can extend Poly to mean Javari's RoMaybe and/or QReadOnly?  
If so, we might consider adding a more generic Poly annotation to the  
framework.


Regards,
Mahmood

P.S. Currently, one can template using generics (e.g <I extends  
@Nullable X> I getSame(I x) { return x; }), but it is quite in-elegant  
and it doesn't actually mean the same thing, as idealy it would be <T  
super @NonNull X extends @Nullable X>).



More information about the checkers mailing list