mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user