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

Method equals

output/java_guava/1.4.17/Types.java:449–471  ·  view source on GitHub ↗
(Object obj)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

equalsMethod · 0.65
getNameMethod · 0.45
getGenericDeclarationMethod · 0.45

Tested by

no test coverage detected