private static boolean memberValueEquals ( Object v1 , Object v2 ) { Class < ? > type = v1 . getClass ( ) ; // Check for primitive, string, class, enum const, annotation, // or ExceptionProxy if ( ! type . isArray ( ) ) return v1 . equals ( v2 ) ; // Check for array of string, class, enum const, annotation, // or ExceptionProxy if ( v1 instanceof Object [ ] && v2 instanceof Object [ ] ) return Arrays . equals ( ( Object [ ] ) v1 , ( Object [ ] ) v2 ) ; // Check for ill formed annotation(s) if ( v2 . getClass ( ) != type ) return false ; // Deal with array of primitives if ( type == byte [ ] . class ) return Arrays . equals ( ( byte [ ] ) v1 , ( byte [ ] ) v2 ) ; if ( type == char [ ] . class ) return Arrays . equals ( ( char [ ] ) v1 , ( char [ ] ) v2 ) ; if ( type == double [ ] . class ) return Arrays . equals ( ( double [ ] ) v1 , ( double [ ] ) v2 ) ; if ( type == float [ ] . class ) return Arrays . equals ( ( float [ ] ) v1 , ( float [ ] ) v2 ) ; if ( type == int [ ] . class ) return Arrays . equals ( ( int [ ] ) v1 , ( int [ ] ) v2 ) ; if ( type == long [ ] . class ) return Arrays . equals ( ( long [ ] ) v1 , ( long [ ] ) v2 ) ; if ( type == short [ ] . class ) return Arrays . equals ( ( short [ ] ) v1 , ( short [ ] ) v2 ) ; assert type == boolean [ ] . class ; return Arrays . equals ( ( boolean [ ] ) v1 , ( boolean [ ] ) v2 ) ; }
Returns true iff the two member values in dynamic proxy return form are equal using the appropriate equality function depending on the member type . The two values will be of the same type unless one of the containing annotations is ill - formed . If one of the containing annotations is ill - formed this method will return false unless the two members are identical object references .