Files
openide/java/java-tests/testData/refactoring/extractMethodObject4Debugger/outs/methodWithPrimitiveParameter.out
Egor Ushakov b5f7185b0b IDEA-371371 Stream trace debugging doesn't work with records
(cherry picked from commit bbe83739e3db7cd0b7a4b8842b6e5c1cbb8d1f32)

IJ-CR-161068

GitOrigin-RevId: a25b07b6d494e07c5bc018f5a6922b9bb4ad7978
2025-04-29 21:45:56 +00:00

44 lines
1.5 KiB
Plaintext

call text: int result = new Test(instance).invoke();
class:
public class GeneratedEvaluationClass {
private Object instance;
public GeneratedEvaluationClass(Object instance) {
this.instance = instance;
}
public static int callMethod1(Object object, int p0) {
try {
Class<?> klass = Class.forName("WithReflectionAccess");
java.lang.reflect.Method member = null;
int interfaceNumber = -1;
Class<?>[] interfaces = null;
while (member == null) {
try {
member = klass.getDeclaredMethod("method", int.class);
} catch (ReflectiveOperationException e) {
if (interfaceNumber == -1) {
interfaces = klass.getInterfaces();
interfaceNumber = 0;
}
if (interfaceNumber < interfaces.length) {
klass = interfaces[interfaceNumber];
interfaceNumber += 1;
} else {
klass = klass.getSuperclass();
if (klass == null) throw e;
interfaceNumber = -1;
}
}
}
member.setAccessible(true);
return (int) member.invoke(object, p0);
} catch (ReflectiveOperationException e) {
throw new RuntimeException(e);
}
}
public int invoke() {
return callMethod1(instance, 42);
}
}