You can use Annotation instances as HashMap keys. The interface defines exactly how equals and hashCode should work. In essence they are equal ...
... if the specified object represents an annotation that is logically equivalent to this one.
However, I am not sure this is what you want.
In particular, if you have the same @CustomAnnotation(x=123)
on two different fields, only one of those can go into the map.
Don't you want to key on the Field and get the annotation back?
FWIW, Field (and Class, and Method) can all be used as keys, with "good semantics" (considered equal if refering to the same object).