void (ClassNode root, ClassNode node) { List<ClassNode> copy = new ArrayList<>(node.nested); for (ClassNode child : copy) { if (child.classStruct.isSynthetic()) { continue; } if ((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_ANONYMOUS) && child.enclosingMethod == null) { Set<String> setEnclosing = child.enclosingClasses; if (!setEnclosing.isEmpty()) { StructEnclosingMethodAttribute attr = child.classStruct.getAttribute(StructGeneralAttribute.ATTRIBUTE_ENCLOSING_METHOD); if (attr != null && attr.getMethodName() != null && node.classStruct.qualifiedName.equals(attr.getClassName()) && node.classStruct.getMethod(attr.getMethodName(), attr.getMethodDescriptor()) != null) { child.enclosingMethod = InterpreterUtil.makeUniqueKey(attr.getMethodName(), attr.getMethodDescriptor()); continue; } } node.nested.remove(child); child.parent = null; setEnclosing.remove(node.classStruct.qualifiedName); boolean hasEnclosing = !setEnclosing.isEmpty() && insertNestedClass(root, child); if (!hasEnclosing) { if (child.type == ClassNode.CLASS_ANONYMOUS) { String message = "Unreferenced anonymous class " + child.classStruct.qualifiedName + "!"; DecompilerContext.getLogger().writeMessage(message, IFernflowerLogger.Severity.WARN); } else if (child.type == ClassNode.CLASS_LOCAL) { String message = "Unreferenced local class " + child.classStruct.qualifiedName + "!"; DecompilerContext.getLogger().writeMessage(message, IFernflowerLogger.Severity.WARN); } } } } }