[Checkers] Supporting unknown annotations?

Mahmood Ali mahmood at MIT.EDU
Sun Aug 17 08:36:22 EDT 2008


Hi Artemus,

Thank you for bringing this up.

> Is there any reason that [AnnotatedTypeFactory].isSupportedQualifier  
> is package private? I want to support user annotation.
(notice the class name correction) It's simply because that this  
method doesn't quite belong to AnnotatedTypeFactory and should be  
moved to QualifierHierarchy.  AnnotatedTypeFactory needs some  
refactoring.  We also want to encourage having only one place to  
specify the supported annotations within the Checker class only.

> My other option is to give an empty set and simply analyize all  
> annotation, discarding any I don't care about.
This is the way it is now.  If you notice,  
AnnotatedTypeFactory.isSupportedQualifier returns true if  
QualifierHierarchy.getTypeQualifiers is empty and the annotation is  
not a source annotation (e.g. Override).  This was a relatively new  
change.

As said earlier, in the next iteration of AnnotatedTypeFactory, some  
methods would be moved to QualifierHierarchy.

Regards,
Mahmood




More information about the checkers mailing list