This commit is contained in:
Egor.Ushakov
2016-11-03 14:17:29 +03:00
parent 8907ec4031
commit d5e89e2279
@@ -514,12 +514,7 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
if (type instanceof InterfaceType) {
return ((InterfaceType)type).superinterfaces().stream();
} else if (type instanceof ClassType) {
StreamEx<ReferenceType> res = StreamEx.of(((ClassType)type).interfaces());
ClassType superclass = ((ClassType)type).superclass();
if (superclass != null) {
res = res.append(superclass);
}
return res;
return StreamEx.<ReferenceType>ofNullable(((ClassType)type).superclass()).prepend(((ClassType)type).interfaces());
}
return StreamEx.empty();
}
@@ -529,9 +524,11 @@ public class MethodBreakpoint extends BreakpointWithHighlighter<JavaMethodBreakp
if (LOG.isDebugEnabled()) {
start = System.currentTimeMillis();
}
MultiMap<ReferenceType, ReferenceType> inheritance = new MultiMap<>();
classType.virtualMachine().allClasses().forEach(type -> supertypes(type).forEach(st -> inheritance.putValue(st, type)));
StreamEx.ofTree(classType, t -> StreamEx.of(inheritance.get(t))).forEach(consumer);
if (LOG.isDebugEnabled()) {
LOG.debug("Processing all classes took: " + String.valueOf(System.currentTimeMillis() - start) + "ms");
}