(Object obj)
| 447 | } |
| 448 | |
| 449 | @Override |
| 450 | public boolean equals(Object obj) { |
| 451 | if (NativeTypeVariableEquals.NATIVE_TYPE_VARIABLE_ONLY) { |
| 452 | // equal only to our TypeVariable implementation with identical bounds |
| 453 | if (obj != null && Proxy.isProxyClass(obj.getClass()) |
| 454 | && Proxy.getInvocationHandler(obj)instanceof TypeVariableInvocationHandler) { |
| 455 | TypeVariableInvocationHandler typeVariableInvocationHandler = (TypeVariableInvocationHandler) Proxy.getInvocationHandler(obj); |
| 456 | TypeVariableImpl<?> that = typeVariableInvocationHandler.typeVariableImpl; |
| 457 | return name.equals(that.getName()) |
| 458 | && genericDeclaration.equals(that.getGenericDeclaration()) |
| 459 | && bounds.equals(that.bounds); |
| 460 | } |
| 461 | return false; |
| 462 | } else { |
| 463 | // equal to any TypeVariable implementation regardless of bounds |
| 464 | if (obj instanceof TypeVariable) { |
| 465 | TypeVariable<?> that = (TypeVariable<?>) obj; |
| 466 | return name.equals(that.getName()) |
| 467 | && genericDeclaration.equals(that.getGenericDeclaration()); |
| 468 | } |
| 469 | return false; |
| 470 | } |
| 471 | } |
| 472 | } |
| 473 | |
| 474 |
nothing calls this directly
no test coverage detected