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
feeafc40
Commit
feeafc40
authored
Aug 04, 2018
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: exclude inner classes from dependencies (#318)
parent
ea1c1eb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
ClassNode.java
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
+2
-3
DependencyCollector.java
...main/java/jadx/core/dex/visitors/DependencyCollector.java
+0
-8
No files found.
jadx-core/src/main/java/jadx/core/dex/nodes/ClassNode.java
View file @
feeafc40
...
...
@@ -354,8 +354,7 @@ public class ClassNode extends LineAttrNode implements ILoadable, IDexNode {
if
(
parentClass
==
null
)
{
if
(
clsInfo
.
isInner
())
{
ClassNode
parent
=
dex
().
resolveClass
(
clsInfo
.
getParentClass
());
parent
=
parent
==
null
?
this
:
parent
;
parentClass
=
parent
;
parentClass
=
parent
==
null
?
this
:
parent
;
}
else
{
parentClass
=
this
;
}
...
...
@@ -365,7 +364,7 @@ public class ClassNode extends LineAttrNode implements ILoadable, IDexNode {
public
ClassNode
getTopParentClass
()
{
ClassNode
parent
=
getParentClass
();
return
parent
==
this
?
this
:
parent
.
getParentClass
();
return
parent
==
this
?
this
:
parent
.
get
Top
ParentClass
();
}
public
List
<
ClassNode
>
getInnerClasses
()
{
...
...
jadx-core/src/main/java/jadx/core/dex/visitors/DependencyCollector.java
View file @
feeafc40
...
...
@@ -30,7 +30,6 @@ public class DependencyCollector extends AbstractVisitor {
processClass
(
inner
,
dex
,
depList
);
}
depList
.
remove
(
cls
);
removeInnerClassesFromDeps
(
cls
,
depList
);
return
false
;
}
...
...
@@ -123,11 +122,4 @@ public class DependencyCollector extends AbstractVisitor {
depList
.
add
(
clsNode
.
getTopParentClass
());
}
}
private
void
removeInnerClassesFromDeps
(
ClassNode
cls
,
Set
<
ClassNode
>
depList
)
{
cls
.
getInnerClasses
().
forEach
(
inner
->
{
depList
.
remove
(
inner
);
removeInnerClassesFromDeps
(
inner
,
depList
);
});
}
}
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