Conversion of result to IntIntPair
@@ -23,6 +23,7 @@ import com.google.common.collect.HashBiMap;
import eu.fasten.core.data.Graph;
import eu.fasten.core.data.JavaScope;
import eu.fasten.core.data.JavaType;
+import it.unimi.dsi.fastutil.ints.IntIntPair;
import eu.fasten.core.data.FastenURI;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
@@ -31,6 +32,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
+
import org.opalj.br.ClassHierarchy;
import org.opalj.br.DeclaredMethod;
import org.opalj.br.Method;
@@ -297,7 +299,17 @@ public class OPALClassHierarchy {
}
}
}
- return new Graph(internalCalls, externalCalls);
+ return new Graph(convert(internalCalls), convert(externalCalls));
+ }
+
+ // Conversion from List<Integer> to IntIntPair
+ private HashMap<IntIntPair, Map<Object, Object>> convert(final HashMap<List<Integer>, Map<Object, Object>> externalCalls) {
+ final HashMap<IntIntPair, Map<Object, Object>> result = new HashMap<>();
+ for (final var e : externalCalls.entrySet()) {
+ final List<Integer> key = e.getKey();
+ result.put(IntIntPair.of(key.get(0).intValue(), key.get(1).intValue()), e.getValue());
+ }
+ return result;
}
/**
* Get call site for a method.
