[Checkers] Cast checking

Artemus Harper subanark at gmail.com
Wed Sep 10 16:47:30 EDT 2008


Would it be possible to move the contents of visitTypeCast (minus the super
call) in BaseTypeVisitor to its own protected overridable method?

I have a different way of checking type casts (and I would like my checker
to return a null QualifierHierarchy, which causes this method to crash).
I cannot simply override this method since its part of the visit structure
and not making a call to super will break checking on anything that is being
cast.

I also cannot disable the cast lint option from within the annotation
processor.

The getSupportedLintOptions method in SourceChecker should probably indicate
that subclasses need to support the lint options that their super class
does. Or you should change getLintOption so that it does not throw
IllegalArgumentException if you ask for an unsupported lint option
(returning false instead).

I've stated in the past why the QualifierHierchy doesn't work for me.
Although I have combined my annotations into a single annotation, I still
need the type information to determine if a type is a subtype of another
one. In my system annotations can look drasticly different depending on the
declared type for the same value.
-- 
Artemus Harper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.csail.mit.edu/mailman/private/checkers/attachments/20080910/b0e8ec7f/attachment.htm 


More information about the checkers mailing list