Class RecordMethodsDesugarizer

java.lang.Object
sootup.interceptors.invokedynamic.RecordMethodsDesugarizer
All Implemented Interfaces:
InvokeDynamicDesugarizer

public final class RecordMethodsDesugarizer extends Object implements InvokeDynamicDesugarizer
ObjectMethods.bootstrap - the body of a record's toString, hashCode and equals - lowered to the code it stands for, component by component (the REF_GET_FIELD bootstrap arguments):
  • toString: "R[a=" + a + ", b=" + b + "]".
  • hashCode: h = 31 * h + hash(c) from h = 0, with Objects.hashCode or the wrapper's static hashCode as hash.
  • equals: this == o, else o instanceof R and each component equal - Objects.equals, Float/Double.compare(a, b) == 0 or == - checked last to first, as ObjectMethods does.
Calls on object components are declared by the component type, so call graphs see the overriding methods.