@@ -116,15 +116,15 @@ public void killSignlinkThread() {
116
116
}
117
117
118
118
public SignlinkNode method386 (Class [] argumentTypes , String functionName , Class functionType ) {
119
- return putNode (0 , 9 , new Object []{functionType , functionName , argumentTypes });
119
+ return putNode (0 , SignlinkNode . Type . METHOD , new Object []{functionType , functionName , argumentTypes });
120
120
121
121
}
122
122
123
123
public SignlinkNode addType4Node (URL url ) {
124
- return putNode (0 , 4 , url );
124
+ return putNode (0 , SignlinkNode . Type . DATA_INPUT_STREAM , url );
125
125
}
126
126
127
- public SignlinkNode putNode (int integerData , int type , Object objectData ) {
127
+ public SignlinkNode putNode (int integerData , SignlinkNode . Type type , Object objectData ) {
128
128
SignlinkNode signlinkNode = new SignlinkNode ();
129
129
signlinkNode .objectData = objectData ;
130
130
signlinkNode .integerData = integerData ;
@@ -183,23 +183,23 @@ public void run() {
183
183
}
184
184
}
185
185
try {
186
- int type = currentNode .type ;
187
- if (type == 1 ) {
186
+ SignlinkNode . Type type = currentNode .type ;
187
+ if (type == SignlinkNode . Type . SOCKET ) {
188
188
// Create connection
189
189
currentNode .value = new Socket (netAddress , currentNode .integerData );
190
- } else if (type == 2 ) {
190
+ } else if (type == SignlinkNode . Type . THREAD ) {
191
191
// Start thread
192
192
Thread thread = new Thread ((Runnable ) currentNode .objectData );
193
193
thread .setDaemon (true );
194
194
thread .start ();
195
195
thread .setPriority (currentNode .integerData );
196
196
currentNode .value = thread ;
197
- } else if (type == 4 )
197
+ } else if (type == SignlinkNode . Type . DATA_INPUT_STREAM )
198
198
currentNode .value = new DataInputStream (((URL ) currentNode .objectData ).openStream ());
199
- else if (type == 9 ) {
199
+ else if (type == SignlinkNode . Type . METHOD ) {
200
200
Object [] objects = (Object []) currentNode .objectData ;
201
201
currentNode .value = ((Class ) objects [0 ]).getDeclaredMethod ((String ) objects [1 ], (Class []) objects [2 ]);
202
- } else if (type == 10 ) {
202
+ } else if (type == SignlinkNode . Type . FIELD ) {
203
203
Object [] objects = (Object []) currentNode .objectData ;
204
204
currentNode .value = ((Class ) objects [0 ]).getDeclaredField ((String ) objects [1 ]);
205
205
} else {
@@ -215,20 +215,20 @@ else if(type == 9) {
215
215
}
216
216
217
217
public SignlinkNode createType10Node (Class variableType , String variableName ) {
218
- return putNode (0 , 10 , new Object []{ variableType , variableName });
218
+ return putNode (0 , SignlinkNode . Type . FIELD , new Object []{ variableType , variableName });
219
219
}
220
220
221
221
// TODO this will just throw an exception, since type 3 isn't handled
222
222
public SignlinkNode createExceptionNode (int arg1 ) {
223
- return putNode (arg1 , 3 , null );
223
+ return putNode (arg1 , SignlinkNode . Type . EXCEPTION , null );
224
224
}
225
225
226
226
public SignlinkNode createThreadNode (int nodeId , Runnable runnableClass ) {
227
- return putNode (nodeId , 2 , runnableClass );
227
+ return putNode (nodeId , SignlinkNode . Type . THREAD , runnableClass );
228
228
}
229
229
230
230
public SignlinkNode createSocketNode (int port ) {
231
- return putNode (port , 1 , null );
231
+ return putNode (port , SignlinkNode . Type . SOCKET , null );
232
232
}
233
233
234
234
public SignlinkNode method396 (int arg0 ) {
0 commit comments