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.
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 theequivalentTo()
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.