Why do crumb annotations have to be on types?
Library version: 0.1.0
It seems like Crumb was designed for annotations to apply specifically to types. This is evidenced in the CrumbProcessor casting annotated elements to TypeElement along with the APIs for things like isConsumerApplicable/isProducerApplicable taking in TypeElement params (rather than just Element).
Is there a reason Crumb couldn't/shouldn't be used for annotating other types of elements, like fields? Interested in the history of how the API evolved to be what it is.
At Dropbox, our feature gating code defines gates as fields/instances of a certain type. Since these gates are fields and Crumb expects types to be annotated, I can't directly annotate the gates with a CrumbProducer annotation.
The workaround I'm planning to do involves generating a new wrapper class that references the field and then annotating that wrapper class with a crumb annotation. This should work fine, but it would be nicer to not have that extra layer of indirection. I'm happy to do the refactor to get Crumb to accept annotations on non-type elements, just wondering if there's something I don't see about the library that would make that work a bad idea.
Thanks!