[Checkers] checkers renaming/refactoring

Michael Ernst mernst at csail.mit.edu
Fri Jun 6 04:06:05 EDT 2008

A response to a few of Matt's suggestions:

> - checkers.types.AnnotatedTypeFactory: it's not a factory (in the
> sense of the design pattern). Really, it takes a tree or element, asks
> the compiler for its unannotated type, and then populates it with
> annotations. I'm having a hard time thinking of a solid name -- I
> considered "AnnotatedTypeFinder", but that might be only slightly
> better than Factory.

A factory method is one that returns an object of a given type.  So, the
methods of AnnotatedTypeFactory feel like factory methods to me.  I dislike
"AnnotatedTypeFinder", because that suggests that the annotated types
already exist and are only being looked up.

> - checkers.metaquals: maybe this should be checkers.quals.meta? On the
> other hand, they're not qualifiers, nor are all of them
> meta-annotations. Alternatively we could put them in checkers.quals
> (which, after refactoring NonNull and Interned annotations into
> checkers.{nonnull,interned}.quals will only contain @Default and
> DefaultLocation) since they all pertain to qualifiers (are written on
> quals, except for @TypeQualifiers).

I agree with the latter suggestion.  I don't think that checkers.quals.meta
is a good choice (nor that the current name is very good).

> - checkers.util.BasicChecker: this is minor, but having it in util may
> give people the idea that it's not a first-class citizen (like the
> other checkers, which have their own packages).

I agree:  it deserves its own package.


More information about the checkers mailing list