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
d4523c4e
Commit
d4523c4e
authored
Mar 29, 2015
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: remove 'static' modifier for inner interfaces
parent
5d894b61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
8 deletions
+8
-8
ClassGen.java
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
+2
-1
AccessInfo.java
jadx-core/src/main/java/jadx/core/dex/info/AccessInfo.java
+2
-3
TestClassGen.java
...re/src/test/java/jadx/tests/integration/TestClassGen.java
+2
-2
TestAnnotations2.java
.../jadx/tests/integration/annotations/TestAnnotations2.java
+2
-2
No files found.
jadx-core/src/main/java/jadx/core/codegen/ClassGen.java
View file @
d4523c4e
...
...
@@ -119,7 +119,8 @@ public class ClassGen {
public
void
addClassDeclaration
(
CodeWriter
clsCode
)
{
AccessInfo
af
=
cls
.
getAccessFlags
();
if
(
af
.
isInterface
())
{
af
=
af
.
remove
(
AccessFlags
.
ACC_ABSTRACT
);
af
=
af
.
remove
(
AccessFlags
.
ACC_ABSTRACT
)
.
remove
(
AccessFlags
.
ACC_STATIC
);
}
else
if
(
af
.
isEnum
())
{
af
=
af
.
remove
(
AccessFlags
.
ACC_FINAL
)
.
remove
(
AccessFlags
.
ACC_ABSTRACT
)
...
...
jadx-core/src/main/java/jadx/core/dex/info/AccessInfo.java
View file @
d4523c4e
...
...
@@ -25,10 +25,9 @@ public class AccessInfo {
public
AccessInfo
remove
(
int
flag
)
{
if
(
containsFlag
(
flag
))
{
return
new
AccessInfo
(
accFlags
-
flag
,
type
);
}
else
{
return
this
;
return
new
AccessInfo
(
accFlags
&
~
flag
,
type
);
}
return
this
;
}
public
AccessInfo
getVisibility
()
{
...
...
jadx-core/src/test/java/jadx/tests/integration/TestClassGen.java
View file @
d4523c4e
...
...
@@ -12,7 +12,7 @@ import static org.junit.Assert.assertThat;
public
class
TestClassGen
extends
IntegrationTest
{
public
static
class
TestCls
{
public
static
interface
I
{
public
interface
I
{
int
test
();
public
int
test3
();
...
...
@@ -28,7 +28,7 @@ public class TestClassGen extends IntegrationTest {
ClassNode
cls
=
getClassNode
(
TestCls
.
class
);
String
code
=
cls
.
getCode
().
toString
();
assertThat
(
code
,
containsString
(
"public
static
interface I {"
));
assertThat
(
code
,
containsString
(
"public interface I {"
));
assertThat
(
code
,
containsString
(
indent
(
2
)
+
"int test();"
));
assertThat
(
code
,
not
(
containsString
(
"public int test();"
)));
assertThat
(
code
,
containsString
(
indent
(
2
)
+
"int test3();"
));
...
...
jadx-core/src/test/java/jadx/tests/integration/annotations/TestAnnotations2.java
View file @
d4523c4e
...
...
@@ -19,7 +19,7 @@ public class TestAnnotations2 extends IntegrationTest {
@Target
({
ElementType
.
TYPE
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
public
static
@interface
A
{
public
@interface
A
{
int
i
();
float
f
();
...
...
@@ -33,7 +33,7 @@ public class TestAnnotations2 extends IntegrationTest {
assertThat
(
code
,
containsString
(
"@Target({ElementType.TYPE})"
));
assertThat
(
code
,
containsString
(
"@Retention(RetentionPolicy.RUNTIME)"
));
assertThat
(
code
,
containsString
(
"public
static
@interface A {"
));
assertThat
(
code
,
containsString
(
"public @interface A {"
));
assertThat
(
code
,
containsString
(
"float f();"
));
assertThat
(
code
,
containsString
(
"int i();"
));
}
...
...
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