boolean (@Nullable UClass aClass, @Nullable RefClass refClass, @NotNull PsiClass serializableClass) { if (aClass == null) return false; if (aClass.getJavaPsi().isInheritor(serializableClass, true)) return true; if (refClass != null) { Set<RefClass> subClasses = refClass.getSubClasses(); for (RefClass subClass : subClasses) { //TODO reimplement if (isSerializable(subClass.getUastElement(), subClass, serializableClass)) return true; } } return false; }