MCPcopy Create free account
hub / github.com/antlr/codebuff / equals

Method equals

output/java_guava/1.4.19/Types.java:448–470  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.65
getNameMethod · 0.45
getGenericDeclarationMethod · 0.45

Tested by

no test coverage detected