repeatable nameless class names
This commit is contained in:
@@ -76,14 +76,18 @@ public class NestedClassProcessor {
|
|||||||
checkNotFoundClasses(root, node);
|
checkNotFoundClasses(root, node);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(ClassNode child : node.nested) {
|
int nameless = 0, synthetics = 0;
|
||||||
// ensure not-empty class name
|
for(ClassNode child : node.nested) {
|
||||||
if((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_MEMBER) && child.simpleName == null) {
|
// ensure not-empty class name
|
||||||
DecompilerContext.getLogger().writeMessage("Nameless local or member class "+child.classStruct.qualifiedName+"!", IFernflowerLogger.WARNING);
|
if((child.type == ClassNode.CLASS_LOCAL || child.type == ClassNode.CLASS_MEMBER) && child.simpleName == null) {
|
||||||
child.simpleName = "NamelessClass"+child.hashCode();
|
if((child.classStruct.access_flags & CodeConstants.ACC_SYNTHETIC) == 0) {
|
||||||
}
|
DecompilerContext.getLogger().writeMessage("Nameless local or member class " + child.classStruct.qualifiedName + "!", IFernflowerLogger.WARNING);
|
||||||
}
|
child.simpleName = "NamelessClass_" + (++nameless);
|
||||||
|
} else {
|
||||||
|
child.simpleName = "SyntheticClass_" + (++synthetics);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(ClassNode child : node.nested) {
|
for(ClassNode child : node.nested) {
|
||||||
if(child.type == ClassNode.CLASS_LAMBDA) {
|
if(child.type == ClassNode.CLASS_LAMBDA) {
|
||||||
|
|||||||
Reference in New Issue
Block a user