1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
.class public Lbaksmali/test/class;
# <- @keyword
# ^^^^^^ @keyword.modifier
.super Ljava/lang/Object;
# ^ @character.special
# ^^^^ @type.builtin
# ^ @punctuation.delimiter
.source "baksmali_test_class.smali"
# <- @keyword.import
.implements Lsome/interface;
.implements Lsome/other/interface;
.annotation build Lsome/annotation;
# ^^^^^ @keyword.modifier
# ^^^^ @type
# ^ @punctuation.delimiter
value1 = "test"
# ^^^^^^ @variable.member
# ^ @operator
# ^^^^^^ @string
value2 = .subannotation Lsome/annotation;
value1 = "test2"
value2 = Lsome/enum;
.end subannotation
.end annotation
.annotation system Lsome/annotation;
.end annotation
.field public static aStaticFieldWithoutAnInitializer:I
# ^ @punctuation.delimiter
# ^ @type.builtin
.field public static longStaticField:J = 0x300000000L
# ^^^^^^^^^^^^ @number
.field public static longNegStaticField:J = -0x300000000L
.field public static intStaticField:I = 0x70000000
.field public static intNegStaticField:I = -500
.field public static shortStaticField:S = 500s
.field public static shortNegStaticField:S = -500s
.field public static byteStaticField:B = 123t
.field public static byteNegStaticField:B = 0xAAt
.field public static floatStaticField:F = 3.1415926f
# ^^^^^^^^^^ @number.float
.field public static doubleStaticField:D = 3.141592653589793
.field public static charStaticField:C = 'a'
# ^^^ @character
.field public static charEscapedStaticField:C = '\n'
# ^^ @string.escape
.field public static boolTrueStaticField:Z = true
# ^^^^ @boolean
.field public static boolFalseStaticField:Z = false
.field public static typeStaticField:Ljava/lang/Class; = Lbaksmali/test/class;
.field public static stringStaticField:Ljava/lang/String; = "test"
.field public static stringEscapedStaticField:Ljava/lang/String; = "test\ntest"
.field public static fieldStaticField:Ljava/lang/reflect/Field; = Lbaksmali/test/class;->fieldStaticField:Ljava/lang/reflect/Field;
.field public static methodStaticField:Ljava/lang/reflect/Method; = Lbaksmali/test/class;->testMethod(ILjava/lang/String;)Ljava/lang/String;
# ^^ @punctuation.delimiter
# ^^^^^^^^^^ @function.method.call
.field public static arrayStaticField:[I = {1, 2, 3, {1, 2, 3, 4}}
# ^ @punctuation.special
# ^ @punctuation.bracket
# ^ @punctuation.delimiter
.field public static enumStaticField:Lsome/enum; = .enum Lsome/enum;->someEnumValue:Lsome/enum;
# ^^^^^^^^^^^^^ @variable.member
.field public static annotationStaticField:Lsome/annotation; = .subannotation Lsome/annotation;
value1 = "test"
value2 = .subannotation Lsome/annotation;
value1 = "test2"
value2 = Lsome/enum;
.end subannotation
.end subannotation
.field public static staticFieldWithAnnotation:I
.annotation runtime La/field/annotation;
# ^^^^^^^ @keyword.modifier
this = "is"
a = "test"
.end annotation
.annotation runtime Lorg/junit/Test;
.end annotation
.end field
.field public instanceField:Ljava/lang/String;
.method public constructor <init>()V
# <- @keyword.function
# ^^^^^^^^^^^ @constructor
# ^^^^^^ @constructor
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
# ^^^^^^^^^^^^^ @keyword.operator
# ^^ @variable.parameter.builtin
return-void
# ^^^^^^^^^^^ @keyword.return
.end method
.method public testMethod(ILjava/lang/String;)Ljava/lang/String;
# ^^^^^^^^^^ @function.method
.registers 3
.annotation runtime Lorg/junit/Test;
.end annotation
.annotation system Lyet/another/annotation;
somevalue = 1234
anothervalue = 3.14159
.end annotation
const-string v0, "testing\n123"
# ^^ @variable.builtin
goto switch:
# ^^^^^^^ @label
sget v0, Lbaksmali/test/class;->staticField:I
switch:
packed-switch v0, pswitch:
try_start:
const/4 v0, 7
const v0, 10
nop
try_end:
.catch Ljava/lang/Exception; {try_start: .. try_end:} handler:
# ^^^^^^ @keyword.exception
.catchall {try_start: .. try_end:} handler2:
# ^^^^^^^^^ @keyword.exception
# ^^ @operator
handler:
Label10:
Label11:
Label12:
Label13:
return-object v0
.array-data 4
1 2 3 4 5 6 200
.end array-data
pswitch:
.packed-switch 10
Label10:
Label11:
Label12:
Label13:
.end packed-switch
handler2:
return-void
.end method
.method public abstract testMethod2()V
.annotation runtime Lsome/annotation;
subannotation = .subannotation Lsome/other/annotation;
value = "value"
.end subannotation
.end annotation
.annotation runtime Lorg/junit/Test;
.end annotation
.end method
.method public tryTest()V
.registers 1
handler:
nop
try_start:
const/4 v0, 7
const v0, 10
nop
try_end:
.catch Ljava/lang/Exception; {try_start: .. try_end:} handler:
.end method
.method public debugTest(IIIII)V
.registers 10
.parameter "Blah"
.parameter
.parameter "BlahWithAnnotations"
.annotation runtime Lsome/annotation;
something = "some value"
somethingelse = 1234
.end annotation
.annotation runtime La/second/annotation;
.end annotation
.end parameter
.parameter
.annotation runtime Lsome/annotation;
something = "some value"
somethingelse = 1234
.end annotation
.end parameter
.parameter "LastParam"
.prologue
# ^^^^^^^^^ @keyword
nop
nop
.source "somefile.java"
# ^^^^^^^ @keyword.import
.line 101
# ^^^ @string.special
nop
.line 50
.local v0, aNumber:I
# ^^^^^^^ @variable
const v0, 1234
.end local v0
.source "someotherfile.java"
.line 900
const-string v0, "1234"
.restart local v0
const v0, 6789
.end local v0
.epilogue
# ^^^^^^^^^ @keyword
.end method
|