The spec of AnnotationMirror contains this line:
Annotations should be compared using the equals method. There is no guarantee that any particular annotation will always be represented by the same object.
This suggests that the equals method provides more than just referential equality. But, there is no definition of the equals method, nor does there appear to be any non-default impl of .equals, so it falls back on just testing referential equality.
Annotations should be compared using the equals method. There is no guarantee that any particular annotation will always be represented by the same object.
This suggests that the equals method provides more than just referential equality. But, there is no definition of the equals method, nor does there appear to be any non-default impl of .equals, so it falls back on just testing referential equality.