private boolean annotationEquals ( Object object ) { if ( object == null || ! ( object instanceof Annotation ) || ! annotationType . equals ( ( ( Annotation ) object ) . annotationType ( ) ) ) { return false ; } for ( Map . Entry < String , Method > entry : attributes . entrySet ( ) ) { String methodName = entry . getKey ( ) ; Method method = entry . getValue ( ) ; Object otherValue ; try { otherValue = method . invoke ( object ) ; Object value = attributeData . get ( methodName ) ; if ( ! attributeEquals ( value , otherValue ) ) { return false ; } } catch ( Exception e ) { return false ; } } return true ; }
Returns true if the specified object represents an annotation that is logically equivalent to this one .