From e913bfa768e08e4edc2ddfc27542abe0abb97353 Mon Sep 17 00:00:00 2001 From: "pl@gohorb.ba-horb.de" Date: Fri, 7 Feb 2020 18:17:58 +0100 Subject: [PATCH] modified: ../../../main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java modified: ../../../main/java/de/dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java Im Bytecode werden MethpdCaltypen bereits beim TYPEen angelegt. --- .../de/dhbwstuttgart/bytecode/BytecodeGenMethod.java | 10 ++++++---- .../dhbwstuttgart/typeinference/typeAlgo/TYPEStmt.java | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java index 00b1fb6e..3bdf21ea 100644 --- a/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java +++ b/src/main/java/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java @@ -754,7 +754,8 @@ public class BytecodeGenMethod implements StatementVisitor { public void visit(MethodCall methodCall) { boolean parentBinary = isParentBinary; System.out.println("In MethodCall = " + methodCall.name); - String receiverName = resolver.getResolvedType(methodCall.receiver.getType()); + //String receiverName = resolver.getResolvedType(methodCall.receiver.getType()); + String receiverName = resolver.getResolvedType(methodCall.receiverType); System.out.println("Methods of " + receiverName + " "); java.lang.reflect.Method methodRefl = null; String clazz = receiverName.replace("/", "."); @@ -768,7 +769,8 @@ public class BytecodeGenMethod implements StatementVisitor { ClassLoader cLoader2; String methCallType = resultSet.resolveType(methodCall.getType()).resolvedType.acceptTV(new TypeToDescriptor()); - String[] typesOfParams = getTypes(methodCall.arglist.getArguments()); + //String[] typesOfParams = getTypes(methodCall.arglist.getArguments()); + String[] typesOfParams = getTypes(methodCall.argTypes); try { clazz = getRawClassName(receiverName, clazz); @@ -918,10 +920,10 @@ public class BytecodeGenMethod implements StatementVisitor { return clazz; } - private String[] getTypes(List arguments) { + private String[] getTypes(List arguments) { String[] types = new String[arguments.size()]; for(int i = 0; i