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
850df18d
Commit
850df18d
authored
Jul 05, 2019
by
Skylot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: update duplicate methods in InsnArg classes
parent
7f4da306
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
8 deletions
+24
-8
FieldArg.java
...c/main/java/jadx/core/dex/instructions/args/FieldArg.java
+5
-0
InsnArg.java
...rc/main/java/jadx/core/dex/instructions/args/InsnArg.java
+1
-1
LiteralArg.java
...main/java/jadx/core/dex/instructions/args/LiteralArg.java
+7
-0
NamedArg.java
...c/main/java/jadx/core/dex/instructions/args/NamedArg.java
+10
-5
RegisterArg.java
...ain/java/jadx/core/dex/instructions/args/RegisterArg.java
+1
-2
No files found.
jadx-core/src/main/java/jadx/core/dex/instructions/args/FieldArg.java
View file @
850df18d
...
...
@@ -59,6 +59,11 @@ public final class FieldArg extends RegisterArg {
}
@Override
public
RegisterArg
duplicate
()
{
return
copyCommonParams
(
new
FieldArg
(
field
,
instArg
));
}
@Override
public
boolean
equals
(
Object
obj
)
{
if
(
this
==
obj
)
{
return
true
;
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/InsnArg.java
View file @
850df18d
...
...
@@ -159,7 +159,7 @@ public abstract class InsnArg extends Typed {
return
contains
(
AFlag
.
THIS
);
}
protected
InsnArg
copyCommonParams
(
InsnArg
copy
)
{
protected
final
<
T
extends
InsnArg
>
T
copyCommonParams
(
T
copy
)
{
copy
.
copyAttributesFrom
(
this
);
copy
.
setParentInsn
(
parentInsn
);
return
copy
;
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/LiteralArg.java
View file @
850df18d
...
...
@@ -49,6 +49,13 @@ public final class LiteralArg extends InsnArg {
}
@Override
public
InsnArg
duplicate
()
{
LiteralArg
copy
=
new
LiteralArg
(
literal
,
getType
());
copy
.
type
=
type
;
return
copyCommonParams
(
copy
);
}
@Override
public
int
hashCode
()
{
return
(
int
)
(
literal
^
literal
>>>
32
)
+
31
*
getType
().
hashCode
();
}
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/NamedArg.java
View file @
850df18d
...
...
@@ -27,6 +27,16 @@ public final class NamedArg extends InsnArg implements Named {
}
@Override
public
InsnArg
duplicate
()
{
return
copyCommonParams
(
new
NamedArg
(
name
,
type
));
}
@Override
public
int
hashCode
()
{
return
name
.
hashCode
();
}
@Override
public
boolean
equals
(
Object
o
)
{
if
(
this
==
o
)
{
return
true
;
...
...
@@ -38,11 +48,6 @@ public final class NamedArg extends InsnArg implements Named {
}
@Override
public
int
hashCode
()
{
return
name
.
hashCode
();
}
@Override
public
String
toString
()
{
return
'('
+
name
+
' '
+
type
+
')'
;
}
...
...
jadx-core/src/main/java/jadx/core/dex/instructions/args/RegisterArg.java
View file @
850df18d
...
...
@@ -115,8 +115,7 @@ public class RegisterArg extends InsnArg implements Named {
if
(
sVar
!=
null
)
{
dup
.
setSVar
(
sVar
);
}
dup
.
copyAttributesFrom
(
this
);
return
dup
;
return
copyCommonParams
(
dup
);
}
@Nullable
...
...
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