@@ -55,13 +55,13 @@ def __init__(self):
55
55
list .__init__ (self )
56
56
JavaInstance .__init__ (self )
57
57
58
- def load_from_instance (self , instance , indent = 0 ):
59
- # type: (JavaInstance, int) -> bool
58
+ def load_from_instance (self , indent = 0 ):
59
+ # type: (int) -> bool
60
60
"""
61
61
Load content from a parsed instance object
62
62
"""
63
63
# Lists have their content in there annotations
64
- for cd , annotations in instance .annotations .items ():
64
+ for cd , annotations in self .annotations .items ():
65
65
if cd .name in self .HANDLED_CLASSES :
66
66
self .extend (ann for ann in annotations [1 :])
67
67
return True
@@ -94,12 +94,12 @@ def __eq__(self, other):
94
94
def __lt__ (self , other ):
95
95
return self .value < other
96
96
97
- def load_from_instance (self , instance , indent = 0 ):
98
- # type: (JavaInstance, int) -> bool
97
+ def load_from_instance (self , indent = 0 ):
98
+ # type: (int) -> bool
99
99
"""
100
100
Load content from a parsed instance object
101
101
"""
102
- for fields in instance .field_data .values ():
102
+ for fields in self .field_data .values ():
103
103
for field , value in fields .items ():
104
104
if field .name == "value" :
105
105
self .value = value
@@ -134,13 +134,13 @@ def __init__(self):
134
134
dict .__init__ (self )
135
135
JavaInstance .__init__ (self )
136
136
137
- def load_from_instance (self , instance , indent = 0 ):
138
- # type: (JavaInstance, int) -> bool
137
+ def load_from_instance (self , indent = 0 ):
138
+ # type: (int) -> bool
139
139
"""
140
140
Load content from a parsed instance object
141
141
"""
142
142
# Maps have their content in there annotations
143
- for cd , annotations in instance .annotations .items ():
143
+ for cd , annotations in self .annotations .items ():
144
144
if cd .name in JavaMap .HANDLED_CLASSES :
145
145
# Group annotation elements 2 by 2
146
146
args = [iter (annotations [1 :])] * 2
@@ -201,13 +201,13 @@ def __init__(self):
201
201
set .__init__ (self )
202
202
JavaInstance .__init__ (self )
203
203
204
- def load_from_instance (self , instance , indent = 0 ):
205
- # type: (JavaInstance, int) -> bool
204
+ def load_from_instance (self , indent = 0 ):
205
+ # type: (int) -> bool
206
206
"""
207
207
Load content from a parsed instance object
208
208
"""
209
209
# Lists have their content in there annotations
210
- for cd , annotations in instance .annotations .items ():
210
+ for cd , annotations in self .annotations .items ():
211
211
if cd .name in self .HANDLED_CLASSES :
212
212
self .update (x for x in annotations [1 :])
213
213
return True
@@ -222,13 +222,13 @@ class JavaTreeSet(JavaSet):
222
222
223
223
HANDLED_CLASSES = "java.util.TreeSet"
224
224
225
- def load_from_instance (self , instance , indent = 0 ):
226
- # type: (JavaInstance, int) -> bool
225
+ def load_from_instance (self , indent = 0 ):
226
+ # type: (int) -> bool
227
227
"""
228
228
Load content from a parsed instance object
229
229
"""
230
230
# Lists have their content in there annotations
231
- for cd , annotations in instance .annotations .items ():
231
+ for cd , annotations in self .annotations .items ():
232
232
if cd .name == self .HANDLED_CLASSES :
233
233
# Annotation[1] == size of the set
234
234
self .update (x for x in annotations [2 :])
@@ -300,19 +300,19 @@ def __str__(self):
300
300
"nano={s.nano}, offset={s.offset}, zone={s.zone})"
301
301
).format (s = self )
302
302
303
- def load_from_blockdata (self , reader , indent = 0 ):
303
+ def load_from_blockdata (self , parser , reader , indent = 0 ):
304
304
"""
305
305
Ignore the SC_BLOCK_DATA flag
306
306
"""
307
307
return True
308
308
309
- def load_from_instance (self , instance , indent = 0 ):
310
- # type: (JavaInstance, int) -> bool
309
+ def load_from_instance (self , indent = 0 ):
310
+ # type: (int) -> bool
311
311
"""
312
312
Load content from a parsed instance object
313
313
"""
314
314
# Lists have their content in there annotations
315
- for cd , annotations in instance .annotations .items ():
315
+ for cd , annotations in self .annotations .items ():
316
316
if cd .name == self .HANDLED_CLASSES :
317
317
# Convert back annotations to bytes
318
318
# latin-1 is used to ensure that bytes are kept as is
0 commit comments