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
957d5394
Commit
957d5394
authored
Aug 16, 2014
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: add static methods for create DotGraphVisitor
parent
95afe121
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
8 deletions
+20
-8
Jadx.java
jadx-core/src/main/java/jadx/core/Jadx.java
+3
-3
DotGraphVisitor.java
...src/main/java/jadx/core/dex/visitors/DotGraphVisitor.java
+17
-5
No files found.
jadx-core/src/main/java/jadx/core/Jadx.java
View file @
957d5394
...
...
@@ -59,7 +59,7 @@ public class Jadx {
passes
.
add
(
new
DebugInfoVisitor
());
passes
.
add
(
new
TypeInference
());
if
(
args
.
isRawCFGOutput
())
{
passes
.
add
(
new
DotGraphVisitor
(
outDir
,
false
,
true
));
passes
.
add
(
DotGraphVisitor
.
dumpRaw
(
outDir
));
}
passes
.
add
(
new
ConstInlinerVisitor
());
...
...
@@ -72,7 +72,7 @@ public class Jadx {
passes
.
add
(
new
CodeShrinker
());
passes
.
add
(
new
ReSugarCode
());
if
(
args
.
isCFGOutput
())
{
passes
.
add
(
new
DotGraphVisitor
(
outDir
,
false
));
passes
.
add
(
DotGraphVisitor
.
dump
(
outDir
));
}
passes
.
add
(
new
RegionMakerVisitor
());
...
...
@@ -85,7 +85,7 @@ public class Jadx {
passes
.
add
(
new
CheckRegions
());
if
(
args
.
isCFGOutput
())
{
passes
.
add
(
new
DotGraphVisitor
(
outDir
,
true
));
passes
.
add
(
DotGraphVisitor
.
dumpRegions
(
outDir
));
}
passes
.
add
(
new
MethodInlineVisitor
());
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/DotGraphVisitor.java
View file @
957d5394
...
...
@@ -30,16 +30,28 @@ public class DotGraphVisitor extends AbstractVisitor {
private
final
boolean
useRegions
;
private
final
boolean
rawInsn
;
public
DotGraphVisitor
(
File
outDir
,
boolean
useRegions
,
boolean
rawInsn
)
{
public
static
DotGraphVisitor
dump
(
File
outDir
)
{
return
new
DotGraphVisitor
(
outDir
,
false
,
false
);
}
public
static
DotGraphVisitor
dumpRaw
(
File
outDir
)
{
return
new
DotGraphVisitor
(
outDir
,
false
,
true
);
}
public
static
DotGraphVisitor
dumpRegions
(
File
outDir
)
{
return
new
DotGraphVisitor
(
outDir
,
true
,
false
);
}
public
static
DotGraphVisitor
dumpRawRegions
(
File
outDir
)
{
return
new
DotGraphVisitor
(
outDir
,
true
,
true
);
}
private
DotGraphVisitor
(
File
outDir
,
boolean
useRegions
,
boolean
rawInsn
)
{
this
.
dir
=
outDir
;
this
.
useRegions
=
useRegions
;
this
.
rawInsn
=
rawInsn
;
}
public
DotGraphVisitor
(
File
outDir
,
boolean
useRegions
)
{
this
(
outDir
,
useRegions
,
false
);
}
@Override
public
void
visit
(
MethodNode
mth
)
{
if
(
mth
.
isNoCode
())
{
...
...
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