|
|
@ -49,8 +49,8 @@ public class NestedClassProcessor { |
|
|
|
// hide synthetic lambda content methods
|
|
|
|
// hide synthetic lambda content methods
|
|
|
|
if (node.type == ClassNode.CLASS_LAMBDA && !node.lambdaInformation.is_method_reference) { |
|
|
|
if (node.type == ClassNode.CLASS_LAMBDA && !node.lambdaInformation.is_method_reference) { |
|
|
|
ClassNode node_content = DecompilerContext.getClassProcessor().getMapRootClasses().get(node.classStruct.qualifiedName); |
|
|
|
ClassNode node_content = DecompilerContext.getClassProcessor().getMapRootClasses().get(node.classStruct.qualifiedName); |
|
|
|
if (node_content != null && node_content.wrapper != null) { |
|
|
|
if (node_content != null && node_content.getWrapper() != null) { |
|
|
|
node_content.wrapper.getHiddenMembers().add(node.lambdaInformation.content_method_key); |
|
|
|
node_content.getWrapper().getHiddenMembers().add(node.lambdaInformation.content_method_key); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -91,7 +91,7 @@ public class NestedClassProcessor { |
|
|
|
insertLocalVars(node, child); |
|
|
|
insertLocalVars(node, child); |
|
|
|
|
|
|
|
|
|
|
|
if (child.type == ClassNode.CLASS_LOCAL) { |
|
|
|
if (child.type == ClassNode.CLASS_LOCAL) { |
|
|
|
setLocalClassDefinition(node.wrapper.getMethods().getWithKey(child.enclosingMethod), child); |
|
|
|
setLocalClassDefinition(node.getWrapper().getMethods().getWithKey(child.enclosingMethod), child); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -107,8 +107,8 @@ public class NestedClassProcessor { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
final MethodWrapper meth = parent.wrapper.getMethods().getWithKey(child.lambdaInformation.content_method_key); |
|
|
|
final MethodWrapper meth = parent.getWrapper().getMethods().getWithKey(child.lambdaInformation.content_method_key); |
|
|
|
final MethodWrapper encmeth = parent.wrapper.getMethods().getWithKey(child.enclosingMethod); |
|
|
|
final MethodWrapper encmeth = parent.getWrapper().getMethods().getWithKey(child.enclosingMethod); |
|
|
|
|
|
|
|
|
|
|
|
MethodDescriptor md_lambda = MethodDescriptor.parseDescriptor(child.lambdaInformation.method_descriptor); |
|
|
|
MethodDescriptor md_lambda = MethodDescriptor.parseDescriptor(child.lambdaInformation.method_descriptor); |
|
|
|
final MethodDescriptor md_content = MethodDescriptor.parseDescriptor(child.lambdaInformation.content_method_descriptor); |
|
|
|
final MethodDescriptor md_content = MethodDescriptor.parseDescriptor(child.lambdaInformation.content_method_descriptor); |
|
|
@ -120,7 +120,7 @@ public class NestedClassProcessor { |
|
|
|
|
|
|
|
|
|
|
|
final boolean is_static_lambda_content = child.lambdaInformation.is_content_method_static; |
|
|
|
final boolean is_static_lambda_content = child.lambdaInformation.is_content_method_static; |
|
|
|
|
|
|
|
|
|
|
|
final String parent_class_name = parent.wrapper.getClassStruct().qualifiedName; |
|
|
|
final String parent_class_name = parent.getWrapper().getClassStruct().qualifiedName; |
|
|
|
final String lambda_class_name = child.simpleName; |
|
|
|
final String lambda_class_name = child.simpleName; |
|
|
|
|
|
|
|
|
|
|
|
final VarType lambda_class_type = new VarType(lambda_class_name, true); |
|
|
|
final VarType lambda_class_type = new VarType(lambda_class_name, true); |
|
|
@ -272,7 +272,7 @@ public class NestedClassProcessor { |
|
|
|
|
|
|
|
|
|
|
|
cltypes |= nd.type; |
|
|
|
cltypes |= nd.type; |
|
|
|
|
|
|
|
|
|
|
|
HashMap<String, List<VarFieldPair>> mask = getMaskLocalVars(nd.wrapper); |
|
|
|
HashMap<String, List<VarFieldPair>> mask = getMaskLocalVars(nd.getWrapper()); |
|
|
|
if (mask.isEmpty()) { |
|
|
|
if (mask.isEmpty()) { |
|
|
|
String message = "Nested class " + nd.classStruct.qualifiedName + " has no constructor!"; |
|
|
|
String message = "Nested class " + nd.classStruct.qualifiedName + " has no constructor!"; |
|
|
|
DecompilerContext.getLogger().writeMessage(message, IFernflowerLogger.Severity.WARN); |
|
|
|
DecompilerContext.getLogger().writeMessage(message, IFernflowerLogger.Severity.WARN); |
|
|
@ -291,7 +291,7 @@ public class NestedClassProcessor { |
|
|
|
if (cltypes != ClassNode.CLASS_MEMBER) { |
|
|
|
if (cltypes != ClassNode.CLASS_MEMBER) { |
|
|
|
|
|
|
|
|
|
|
|
// iterate enclosing class
|
|
|
|
// iterate enclosing class
|
|
|
|
for (final MethodWrapper meth : node.wrapper.getMethods()) { |
|
|
|
for (final MethodWrapper meth : node.getWrapper().getMethods()) { |
|
|
|
|
|
|
|
|
|
|
|
if (meth.root != null) { // neither abstract, nor native
|
|
|
|
if (meth.root != null) { // neither abstract, nor native
|
|
|
|
DirectGraph graph = meth.getOrBuildGraph(); |
|
|
|
DirectGraph graph = meth.getOrBuildGraph(); |
|
|
@ -423,7 +423,7 @@ public class NestedClassProcessor { |
|
|
|
for (Entry<String, List<VarFieldPair>> entmt : entcl.getValue().entrySet()) { |
|
|
|
for (Entry<String, List<VarFieldPair>> entmt : entcl.getValue().entrySet()) { |
|
|
|
mergeListSignatures(entmt.getValue(), intrPairMask, false); |
|
|
|
mergeListSignatures(entmt.getValue(), intrPairMask, false); |
|
|
|
|
|
|
|
|
|
|
|
MethodWrapper meth = nestedNode.wrapper.getMethodWrapper("<init>", entmt.getKey()); |
|
|
|
MethodWrapper meth = nestedNode.getWrapper().getMethodWrapper("<init>", entmt.getKey()); |
|
|
|
meth.signatureFields = new ArrayList<VarVersionPair>(); |
|
|
|
meth.signatureFields = new ArrayList<VarVersionPair>(); |
|
|
|
|
|
|
|
|
|
|
|
for (VarFieldPair pair : entmt.getValue()) { |
|
|
|
for (VarFieldPair pair : entmt.getValue()) { |
|
|
@ -436,10 +436,10 @@ public class NestedClassProcessor { |
|
|
|
private static void insertLocalVars(final ClassNode parent, final ClassNode child) { |
|
|
|
private static void insertLocalVars(final ClassNode parent, final ClassNode child) { |
|
|
|
|
|
|
|
|
|
|
|
// enclosing method, is null iff member class
|
|
|
|
// enclosing method, is null iff member class
|
|
|
|
MethodWrapper encmeth = parent.wrapper.getMethods().getWithKey(child.enclosingMethod); |
|
|
|
MethodWrapper encmeth = parent.getWrapper().getMethods().getWithKey(child.enclosingMethod); |
|
|
|
|
|
|
|
|
|
|
|
// iterate all child methods
|
|
|
|
// iterate all child methods
|
|
|
|
for (final MethodWrapper meth : child.wrapper.getMethods()) { |
|
|
|
for (final MethodWrapper meth : child.getWrapper().getMethods()) { |
|
|
|
|
|
|
|
|
|
|
|
if (meth.root != null) { // neither abstract nor native
|
|
|
|
if (meth.root != null) { // neither abstract nor native
|
|
|
|
|
|
|
|
|
|
|
@ -503,7 +503,7 @@ public class NestedClassProcessor { |
|
|
|
|
|
|
|
|
|
|
|
if (clnode.type != ClassNode.CLASS_MEMBER) { |
|
|
|
if (clnode.type != ClassNode.CLASS_MEMBER) { |
|
|
|
|
|
|
|
|
|
|
|
MethodWrapper enclosing_method = clnode.parent.wrapper.getMethods().getWithKey(clnode.enclosingMethod); |
|
|
|
MethodWrapper enclosing_method = clnode.parent.getWrapper().getMethods().getWithKey(clnode.enclosingMethod); |
|
|
|
|
|
|
|
|
|
|
|
varname = enclosing_method.varproc.getVarName(entr.getValue()); |
|
|
|
varname = enclosing_method.varproc.getVarName(entr.getValue()); |
|
|
|
vartype = enclosing_method.varproc.getVarType(entr.getValue()); |
|
|
|
vartype = enclosing_method.varproc.getVarType(entr.getValue()); |
|
|
@ -528,7 +528,7 @@ public class NestedClassProcessor { |
|
|
|
// hide synthetic field
|
|
|
|
// hide synthetic field
|
|
|
|
if (clnode == child) { // fields higher up the chain were already handled with their classes
|
|
|
|
if (clnode == child) { // fields higher up the chain were already handled with their classes
|
|
|
|
StructField fd = child.classStruct.getFields().getWithKey(entr.getKey()); |
|
|
|
StructField fd = child.classStruct.getFields().getWithKey(entr.getKey()); |
|
|
|
child.wrapper.getHiddenMembers().add(InterpreterUtil.makeUniqueKey(fd.getName(), fd.getDescriptor())); |
|
|
|
child.getWrapper().getHiddenMembers().add(InterpreterUtil.makeUniqueKey(fd.getName(), fd.getDescriptor())); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|