Commit fd3498ad authored by Donlon's avatar Donlon Committed by skylot

fix: show method alias in "method not decompiled" messages (#410)

parent 1ac2cdfc
...@@ -4,6 +4,8 @@ import java.util.Iterator; ...@@ -4,6 +4,8 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import com.android.dx.rop.code.AccessFlags; import com.android.dx.rop.code.AccessFlags;
import jadx.core.dex.info.ClassInfo;
import jadx.core.utils.Utils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -165,8 +167,16 @@ public class MethodGen { ...@@ -165,8 +167,16 @@ public class MethodGen {
addFallbackMethodCode(code); addFallbackMethodCode(code);
code.startLine("*/"); code.startLine("*/");
ClassInfo clsAlias = mth.getParentClass().getAlias();
code.startLine("throw new UnsupportedOperationException(\"Method not decompiled: ") code.startLine("throw new UnsupportedOperationException(\"Method not decompiled: ")
.add(mth.toString()) .add(clsAlias.makeFullClsName(clsAlias.getShortName(), true))
.add(".")
.add(mth.getAlias())
.add("(")
.add(Utils.listToString(mth.getMethodInfo().getArgumentsTypes()))
.add("):")
.add(mth.getMethodInfo().getReturnType().toString())
.add("\");"); .add("\");");
} else { } else {
RegionGen regionGen = new RegionGen(this); RegionGen regionGen = new RegionGen(this);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment