[Checkers] checkers renaming/refactoring

Matt Papi mpapi at csail.mit.edu
Thu Jun 5 20:46:58 EDT 2008

Here's my list of suggested renamings/factorings for checker &
framework classes. I'm doing this via email partly to enable
discussion, and partly because I don't want to make a bunch of large
(diff-wise) changes right before a release (and leaving).

- 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.

- checkers.basetype: I've been kind of bothered by the fact that it's
not "checkers.base", though this depends on whether you think of it as
Base TypeChecker or BaseType Checker. (I think of it as the former,
which is why I prefer checkers.base.)

- 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).

- checkers.types.AnnotationFactory: as major comment, this doesn't
really have anything to do with types, so it should be moved to
checkers.util. As a minor comment, it's not really a factory, so maybe
"checkers.util.Annotations" is a better name, or its methods could be
merged with checkers.util.AnnotationUtils

- checkers.util.AnnotatedTypes: does this belong in checkers.types?
Mahmood, I seem to remember you having a good reason for it being in

- 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).

- checkers.util.TreeDebug: we moved things like Locations and the
skeleton generator into their own subpackages of util, and TreeDebug
is the only such class that's still there

These might be on someone's todo list already:
- NonNull* -> Nullness*
- Nullness qualifiers to checkers.nullness.quals
- Interned* -> Interning*
- Interning qualifier to checkers.interning.quals

- Matt

More information about the checkers mailing list