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
cc1be673
Commit
cc1be673
authored
Aug 10, 2013
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: sort classes in package and methods
parent
f9e87d4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
0 deletions
+16
-0
Decompiler.java
jadx-core/src/main/java/jadx/api/Decompiler.java
+9
-0
JavaClass.java
jadx-core/src/main/java/jadx/api/JavaClass.java
+7
-0
No files found.
jadx-core/src/main/java/jadx/api/Decompiler.java
View file @
cc1be673
...
@@ -16,6 +16,7 @@ import java.io.File;
...
@@ -16,6 +16,7 @@ import java.io.File;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -89,6 +90,14 @@ public final class Decompiler {
...
@@ -89,6 +90,14 @@ public final class Decompiler {
packages
.
add
(
new
JavaPackage
(
entry
.
getKey
(),
entry
.
getValue
()));
packages
.
add
(
new
JavaPackage
(
entry
.
getKey
(),
entry
.
getValue
()));
}
}
Collections
.
sort
(
packages
);
Collections
.
sort
(
packages
);
for
(
JavaPackage
pkg
:
packages
)
{
Collections
.
sort
(
pkg
.
getClasses
(),
new
Comparator
<
JavaClass
>()
{
@Override
public
int
compare
(
JavaClass
o1
,
JavaClass
o2
)
{
return
o1
.
getShortName
().
compareTo
(
o2
.
getShortName
());
}
});
}
return
Collections
.
unmodifiableList
(
packages
);
return
Collections
.
unmodifiableList
(
packages
);
}
}
...
...
jadx-core/src/main/java/jadx/api/JavaClass.java
View file @
cc1be673
...
@@ -8,6 +8,7 @@ import jadx.core.dex.nodes.MethodNode;
...
@@ -8,6 +8,7 @@ import jadx.core.dex.nodes.MethodNode;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Comparator
;
import
java.util.List
;
import
java.util.List
;
public
final
class
JavaClass
{
public
final
class
JavaClass
{
...
@@ -54,6 +55,12 @@ public final class JavaClass {
...
@@ -54,6 +55,12 @@ public final class JavaClass {
mths
.
add
(
new
JavaMethod
(
m
));
mths
.
add
(
new
JavaMethod
(
m
));
}
}
}
}
Collections
.
sort
(
mths
,
new
Comparator
<
JavaMethod
>()
{
@Override
public
int
compare
(
JavaMethod
o1
,
JavaMethod
o2
)
{
return
o1
.
getName
().
compareTo
(
o2
.
getName
());
}
});
this
.
methods
=
Collections
.
unmodifiableList
(
mths
);
this
.
methods
=
Collections
.
unmodifiableList
(
mths
);
}
}
}
}
...
...
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