Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jadx
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
jadx
Commits
8e0df4c4
Commit
8e0df4c4
authored
May 10, 2019
by
Jan S
Committed by
skylot
May 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(gui): printUsage for jadx-gui now shows the new gui only parameter(s) (PR #660)
parent
86a4ed7f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
3 deletions
+20
-3
JCommanderWrapper.java
jadx-cli/src/main/java/jadx/cli/JCommanderWrapper.java
+20
-3
No files found.
jadx-cli/src/main/java/jadx/cli/JCommanderWrapper.java
View file @
8e0df4c4
...
...
@@ -3,7 +3,9 @@ package jadx.cli;
import
java.io.PrintStream
;
import
java.lang.reflect.Field
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.LinkedHashMap
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -66,9 +68,9 @@ public class JCommanderWrapper<T> {
maxNamesLen
=
len
;
}
}
JadxCLIArgs
args
=
new
JadxCLIArgs
();
Field
[]
fields
=
args
.
getClass
().
getDeclaredFields
(
);
for
(
Field
f
:
fields
)
{
JadxCLIArgs
args
=
(
JadxCLIArgs
)
jc
.
getObjects
().
get
(
0
);
for
(
Field
f
:
getFields
(
args
.
getClass
())
)
{
String
name
=
f
.
getName
();
ParameterDescription
p
=
paramsMap
.
get
(
name
);
if
(
p
==
null
)
{
...
...
@@ -85,6 +87,21 @@ public class JCommanderWrapper<T> {
out
.
println
(
" jadx -d out classes.dex"
);
}
/**
* Get all declared fields of the specified class and all super classes
*
* @param clazz
* @return
*/
private
List
<
Field
>
getFields
(
Class
<?>
clazz
)
{
List
<
Field
>
fieldList
=
new
LinkedList
<>();
while
(
clazz
!=
null
)
{
fieldList
.
addAll
(
Arrays
.
asList
(
clazz
.
getDeclaredFields
()));
clazz
=
clazz
.
getSuperclass
();
}
return
fieldList
;
}
private
void
addDefaultValue
(
JadxCLIArgs
args
,
Field
f
,
StringBuilder
opt
)
{
Class
<?>
fieldType
=
f
.
getType
();
if
(
fieldType
==
int
.
class
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment