Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76393173
jadx
提交
5d60f2cd
J
jadx
项目概览
2301_76393173
/
jadx
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jadx
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5d60f2cd
编写于
1月 14, 2018
作者:
S
Sergey Toshin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PR for issue #191
上级
c4765939
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
5 deletion
+29
-5
jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
+9
-0
jadx-core/src/main/java/jadx/api/IJadxArgs.java
jadx-core/src/main/java/jadx/api/IJadxArgs.java
+2
-0
jadx-core/src/main/java/jadx/api/JadxArgs.java
jadx-core/src/main/java/jadx/api/JadxArgs.java
+11
-0
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
+6
-4
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
+1
-1
未找到文件。
jadx-cli/src/main/java/jadx/cli/JadxCLIArgs.java
浏览文件 @
5d60f2cd
...
...
@@ -47,6 +47,10 @@ public class JadxCLIArgs implements IJadxArgs {
@Parameter
(
names
=
{
"--show-bad-code"
},
description
=
"show inconsistent code (incorrectly decompiled)"
)
protected
boolean
showInconsistentCode
=
false
;
@Parameter
(
names
=
{
"--no-imports"
},
converter
=
InvertedBooleanConverter
.
class
,
description
=
"disables use of imports, always writes entire package name"
)
protected
boolean
useImports
=
true
;
@Parameter
(
names
=
"--no-replace-consts"
,
converter
=
InvertedBooleanConverter
.
class
,
description
=
"don't replace constant value with matching constant field"
)
protected
boolean
replaceConsts
=
true
;
...
...
@@ -246,6 +250,11 @@ public class JadxCLIArgs implements IJadxArgs {
return
showInconsistentCode
;
}
@Override
public
boolean
isUsingImports
()
{
return
useImports
;
}
@Override
public
boolean
isVerbose
()
{
return
verbose
;
...
...
jadx-core/src/main/java/jadx/api/IJadxArgs.java
浏览文件 @
5d60f2cd
...
...
@@ -14,6 +14,8 @@ public interface IJadxArgs {
boolean
isFallbackMode
();
boolean
isShowInconsistentCode
();
boolean
isUsingImports
();
boolean
isVerbose
();
...
...
jadx-core/src/main/java/jadx/api/JadxArgs.java
浏览文件 @
5d60f2cd
...
...
@@ -13,6 +13,8 @@ public class JadxArgs implements IJadxArgs {
private
boolean
isVerbose
=
false
;
private
boolean
fallbackMode
=
false
;
private
boolean
showInconsistentCode
=
false
;
private
boolean
useImports
=
false
;
private
boolean
isSkipResources
=
false
;
private
boolean
isSkipSources
=
false
;
...
...
@@ -82,6 +84,15 @@ public class JadxArgs implements IJadxArgs {
this
.
showInconsistentCode
=
showInconsistentCode
;
}
@Override
public
boolean
isUsingImports
()
{
return
useImports
;
}
public
void
setUseImports
(
boolean
useImports
)
{
this
.
useImports
=
useImports
;
}
@Override
public
boolean
isVerbose
()
{
return
isVerbose
;
...
...
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
浏览文件 @
5d60f2cd
...
...
@@ -52,23 +52,25 @@ public class ClassGen {
private
final
ClassGen
parentGen
;
private
final
AnnotationGen
annotationGen
;
private
final
boolean
fallback
;
private
final
boolean
useImports
;
private
final
boolean
showInconsistentCode
;
private
final
Set
<
ClassInfo
>
imports
=
new
HashSet
<>();
private
int
clsDeclLine
;
public
ClassGen
(
ClassNode
cls
,
IJadxArgs
jadxArgs
)
{
this
(
cls
,
null
,
jadxArgs
.
isFallbackMode
(),
jadxArgs
.
isShowInconsistentCode
());
this
(
cls
,
null
,
jadxArgs
.
is
UsingImports
(),
jadxArgs
.
is
FallbackMode
(),
jadxArgs
.
isShowInconsistentCode
());
}
public
ClassGen
(
ClassNode
cls
,
ClassGen
parentClsGen
)
{
this
(
cls
,
parentClsGen
,
parentClsGen
.
fallback
,
parentClsGen
.
showInconsistentCode
);
this
(
cls
,
parentClsGen
,
parentClsGen
.
useImports
,
parentClsGen
.
fallback
,
parentClsGen
.
showInconsistentCode
);
}
public
ClassGen
(
ClassNode
cls
,
ClassGen
parentClsGen
,
boolean
fallback
,
boolean
showBadCode
)
{
public
ClassGen
(
ClassNode
cls
,
ClassGen
parentClsGen
,
boolean
useImports
,
boolean
fallback
,
boolean
showBadCode
)
{
this
.
cls
=
cls
;
this
.
parentGen
=
parentClsGen
;
this
.
fallback
=
fallback
;
this
.
useImports
=
useImports
;
this
.
showInconsistentCode
=
showBadCode
;
this
.
annotationGen
=
new
AnnotationGen
(
cls
,
this
);
...
...
@@ -480,7 +482,7 @@ public class ClassGen {
private
String
useClassInternal
(
ClassInfo
useCls
,
ClassInfo
extClsInfo
)
{
String
fullName
=
extClsInfo
.
getFullName
();
if
(
fallback
)
{
if
(
fallback
||
!
useImports
)
{
return
fullName
;
}
String
shortName
=
extClsInfo
.
getShortName
();
...
...
jadx-core/src/main/java/jadx/core/codegen/MethodGen.java
浏览文件 @
5d60f2cd
...
...
@@ -245,7 +245,7 @@ public class MethodGen {
* Return fallback variant of method codegen
*/
public
static
MethodGen
getFallbackMethodGen
(
MethodNode
mth
)
{
ClassGen
clsGen
=
new
ClassGen
(
mth
.
getParentClass
(),
null
,
true
,
true
);
ClassGen
clsGen
=
new
ClassGen
(
mth
.
getParentClass
(),
null
,
true
,
true
,
true
);
return
new
MethodGen
(
clsGen
,
mth
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录