smallrye / jandex

Java Annotation Indexer
Apache License 2.0
394 stars 94 forks source link

Establish the notion of annotation instance equivalence #318

Closed Ladicek closed 1 year ago

Ladicek commented 1 year ago

The AnnotationInstance.equals() method provides equality. Two annotation instances are equal if, among others, they have identical annotation target. This is often not necessary. Therefore, this commit adds the equivalentTo() method, which provides equivalence. Two annotation instances are equivalent if they have the same name (the same annotation type) and the same members. No attention is paid to the annotation target.