Skip to content

Commit

Permalink
feat: add methods information from standard library, improve generics…
Browse files Browse the repository at this point in the history
… and varargs restore (#836)
  • Loading branch information
skylot committed Feb 16, 2020
1 parent 74b88b4 commit dea7714
Show file tree
Hide file tree
Showing 75 changed files with 2,169 additions and 1,016 deletions.
Binary file modified jadx-core/clsp-data/android-29-clst.jar
Binary file not shown.
8 changes: 8 additions & 0 deletions jadx-core/src/main/java/jadx/api/JadxArgs.java
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ private void updateRenameFlag(boolean enabled, RenameEnum flag) {
}
}

public void setRenameFlags(Set<RenameEnum> renameFlags) {
this.renameFlags = renameFlags;
}

public Set<RenameEnum> getRenameFlags() {
return renameFlags;
}

public OutputFormatEnum getOutputFormat() {
return outputFormat;
}
Expand Down
6 changes: 0 additions & 6 deletions jadx-core/src/main/java/jadx/api/JavaMethod.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,12 @@ public List<ArgType> getArguments() {
return Collections.emptyList();
}
List<ArgType> arguments = mth.getArgTypes();
if (arguments == null) {
arguments = infoArgTypes;
}
return Utils.collectionMap(arguments,
type -> ArgType.tryToResolveClassAlias(mth.dex(), type));
}

public ArgType getReturnType() {
ArgType retType = mth.getReturnType();
if (retType == null) {
retType = mth.getMethodInfo().getReturnType();
}
return ArgType.tryToResolveClassAlias(mth.dex(), retType);
}

Expand Down
4 changes: 4 additions & 0 deletions jadx-core/src/main/java/jadx/core/Jadx.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import org.slf4j.LoggerFactory;

import jadx.api.JadxArgs;
import jadx.core.dex.visitors.AttachMethodDetails;
import jadx.core.dex.visitors.ClassModifier;
import jadx.core.dex.visitors.ConstInlineVisitor;
import jadx.core.dex.visitors.ConstructorVisitor;
Expand All @@ -25,6 +26,7 @@
import jadx.core.dex.visitors.InitCodeVariables;
import jadx.core.dex.visitors.MarkFinallyVisitor;
import jadx.core.dex.visitors.MethodInlineVisitor;
import jadx.core.dex.visitors.MethodInvokeVisitor;
import jadx.core.dex.visitors.ModVisitor;
import jadx.core.dex.visitors.PrepareForCodeGen;
import jadx.core.dex.visitors.ProcessAnonymous;
Expand Down Expand Up @@ -83,6 +85,7 @@ public static List<IDexTreeVisitor> getPassesList(JadxArgs args) {
passes.add(new InitCodeVariables());
passes.add(new MarkFinallyVisitor());
passes.add(new ConstInlineVisitor());
passes.add(new AttachMethodDetails());
passes.add(new TypeInferenceVisitor());
if (args.isDebugInfo()) {
passes.add(new DebugInfoApplyVisitor());
Expand All @@ -102,6 +105,7 @@ public static List<IDexTreeVisitor> getPassesList(JadxArgs args) {
passes.add(new CleanRegions());

passes.add(new CodeShrinkVisitor());
passes.add(new MethodInvokeVisitor());
passes.add(new SimplifyVisitor());
passes.add(new CheckRegions());

Expand Down
Loading

0 comments on commit dea7714

Please sign in to comment.