From 0ceae1ebb7deb32fd0e77cd32258dd2a3def7bc2 Mon Sep 17 00:00:00 2001 From: Fayez Abu Alia Date: Wed, 14 Nov 2018 12:11:03 +0100 Subject: [PATCH] Bug 122 gefixt. MatrixTest und OLTest funktionieren --- .../bytecode/BytecodeGenMethod.java | 81 ++++++++++++++++--- 1 file changed, 69 insertions(+), 12 deletions(-) diff --git a/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java b/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java index 5e47d5fbe..9449df044 100644 --- a/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java +++ b/src/de/dhbwstuttgart/bytecode/BytecodeGenMethod.java @@ -677,7 +677,8 @@ public class BytecodeGenMethod implements StatementVisitor { ClassLoader cLoader2; java.lang.reflect.Method methodRefl = null; String clazz = receiverName.replace("/", "."); - + String methCallType = resultSet.resolveType(methodCall.getType()).resolvedType.acceptTV(new TypeToDescriptor()); + String[] typesOfParams = getTypes(methodCall.arglist.getArguments()); try { if(receiverName.contains("<")) { clazz = clazz.substring(0, receiverName.indexOf("<")); @@ -688,15 +689,15 @@ public class BytecodeGenMethod implements StatementVisitor { methodRefl = getMethod(methodCall.name,methodCall.arglist.getArguments().size(),methods); } catch (Exception e) { - try { - cLoader2 = new URLClassLoader(new URL[] {new URL("file://"+path)}); - java.lang.reflect.Method[] methods = cLoader2.loadClass(clazz).getMethods(); - System.out.println("Methods of " + receiverName + " "); - for(int i = 0; i arguments) { + String[] types = new String[arguments.size()]; + for(int i = 0; i[] pTypes = m.getParameterTypes(); + for(int j = 0; j