ClassInfo (@NotNull Class<?> clazz) { try { String source = getSourceForClassesList(basePath, clazz); ClassInfo info = myClasses.get(clazz); if (info != null) { return info; } info = new ClassInfo(++myIdCounter, clazz, source); myClasses.put(clazz, info); //resolve super class Class<?> superclass = clazz.getSuperclass(); if (superclass == null) superclass = Object.class; info.superClass = logClass(superclass); //resolve interfaces List<ClassInfo> interfaces = new ArrayList<>(); for (Class<?> aClass : clazz.getInterfaces()) { interfaces.add(logClass(aClass)); } info.interfaces = interfaces; return info; } catch (Throwable t) { throw new RuntimeException("Failed to process class " + clazz.getName(), t); } }