Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
S
SandHook
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
Administrator
SandHook
Commits
8dc5d1bf
Commit
8dc5d1bf
authored
Jan 21, 2019
by
swift_gan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add global ref
parent
729a53fa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
HookWrapper.java
...src/main/java/com/swift/sandhook/wrapper/HookWrapper.java
+4
-0
No files found.
app/src/main/java/com/swift/sandhook/wrapper/HookWrapper.java
View file @
8dc5d1bf
...
@@ -8,9 +8,12 @@ import java.lang.reflect.Method;
...
@@ -8,9 +8,12 @@ import java.lang.reflect.Method;
import
java.lang.reflect.Modifier
;
import
java.lang.reflect.Modifier
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
public
class
HookWrapper
{
public
class
HookWrapper
{
Map
<
Member
,
HookEntity
>
hookEntityMap
=
new
ConcurrentHashMap
<>();
public
static
void
addHookClass
(
Class
<?>...
classes
)
throws
HookErrorException
{
public
static
void
addHookClass
(
Class
<?>...
classes
)
throws
HookErrorException
{
for
(
Class
clazz:
classes
)
{
for
(
Class
clazz:
classes
)
{
addHookClass
(
clazz
);
addHookClass
(
clazz
);
...
@@ -25,6 +28,7 @@ public class HookWrapper {
...
@@ -25,6 +28,7 @@ public class HookWrapper {
for
(
HookEntity
entity:
hookEntityMap
.
values
())
{
for
(
HookEntity
entity:
hookEntityMap
.
values
())
{
if
(
entity
.
target
!=
null
&&
entity
.
hook
!=
null
)
{
if
(
entity
.
target
!=
null
&&
entity
.
hook
!=
null
)
{
SandHook
.
hook
(
entity
.
target
,
entity
.
hook
,
entity
.
backup
);
SandHook
.
hook
(
entity
.
target
,
entity
.
hook
,
entity
.
backup
);
hookEntityMap
.
put
(
entity
.
target
,
entity
);
}
}
}
}
}
}
...
...
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