Refactoring to support more annotation types.
Split the actual annotation handling logic out of AnnotationVisitor,
instead delegating to a new AnnotationHandler interface. The visitor now
simply takes a map of annotation name to handler, and delegate all the
interesting work.
Create a new GreylistAnnotationHandler for dealing with the existing
@UnsupportedAppUsage annotations.
Add support for writing to a whitelist file too, though this is not used
yet in this CL. A new parameter --write-whitelist specifies a filename to
write this to.
Also refactor the tests along similar lines.
Bug: 112186571
Test: atest class2greylisttest
Change-Id: Ic4da92f3499da7f40f9207ad1776ad79d76464a4
11 files changed