[Checkers] <@ReadOnly Object> generic type (fwd)

Matt Papi mpapi at csail.mit.edu
Wed Mar 26 10:29:16 EDT 2008


> These examples suggest a generalization.  For methods with no (possibly
> inherited) methods with mutable receiver, make "extends Foo" equivalent to
> "extends @Readonly Foo".  Otherwise, "extends Foo" is equivalent to
> "extends @Mutable Foo".
> 
> Does this proposal work, or am I missing something?

I believe that it works. (But it should be "for _classes_ with no 
methods with a mutable receiver", right?)

Can we generalize it further -- over all type systems -- so that we can 
eventually implement this in the framework rather than special-casing it 
for IGJ and Javari? (This goes back to the idea of handing the framework 
the annotation type hierarchy and having it sort things out 
automatically.) I think "for classes with no methods with a receiver 
bearing a subtype qualifier" works, but only for type systems like 
Javari and IGJ for which Object is not the base type.

- Matt



More information about the checkers mailing list