[Checkers] QualifierRoot
Mahmood Ali
mahmood at MIT.EDU
Wed Jun 11 14:55:03 EDT 2008
Greetings,
I am considering removing @QualifierRoot (per Mike's suggestion), but
there are two outstanding issues.
Mike's recommendation in the TODO.txt is:
> Can't GraphQualifierHierarchy just
> determine this from the fact that exactly one of the qualifiers has no
> @SubtypeOf annotation? I propose we eliminate it.
The two issues are
__Unqualified roots, e.g. Interned __
The Interning type system consist of one qualifier only: @Interned,
without its supertype @UnInterned. To specify this behavior and make
the proposal work, we need to figure out a way to specify that it is a
subtype of unqualified.
I propose to create a special annotations in the framework
@Unqualified to be indicate that a qualifier is a subtype of
unqualified type. What do you think?
Alternatives:
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>.
__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 am about to add a test of this to the Javari test suite.
- Mahmood
More information about the checkers
mailing list