The Android Open Source Project | 2ad60cf | 2008-10-21 07:00:00 -0700 | [diff] [blame^] | 1 | # |
| 2 | # sample small-but-valid classfile |
| 3 | # |
| 4 | |
| 5 | cafe babe # magic |
| 6 | 0000 # minor_version |
| 7 | 002e # major_version |
| 8 | 000c # constant_pool_count |
| 9 | |
| 10 | # |
| 11 | # constant_pool |
| 12 | # |
| 13 | 07 0003 # 0001: class[Small] |
| 14 | 07 0004 # 0002: class[java/lang/Object] |
| 15 | 01 0005 "Small" # 0003: utf8["Small"] |
| 16 | 01 0010 "java/lang/Object" # 0004: utf8["java/lang/Object"] |
| 17 | 01 0005 "blort" # 0005: utf8["blort"] |
| 18 | 01 0003 "()V" # 0006: utf8["()V"] |
| 19 | 01 0004 "Code" # 0007: utf8["Code"] |
| 20 | 01 000f "java/lang/Error" # 0008: utf8["java/lang/Error"] |
| 21 | 01 0013 "java/lang/Exception" # 0009: utf8["java/lang/Exception"] |
| 22 | 07 0008 # 000a: class[java/lang/Error] |
| 23 | 07 0009 # 000b: class[java/lang/Exception] |
| 24 | |
| 25 | 0001 # access_flags |
| 26 | 0001 # this_class |
| 27 | 0002 # super_class |
| 28 | 0000 # interfaces_count |
| 29 | 0000 # fields_count |
| 30 | 0001 # methods_count |
| 31 | |
| 32 | # methods[0] |
| 33 | 0001 # access_flags |
| 34 | 0005 # name |
| 35 | 0006 # descriptor |
| 36 | 0001 # attributes_count |
| 37 | # attributes[0] |
| 38 | 0007 # name |
| 39 | 00000027 # length |
| 40 | 0001 # max_stack |
| 41 | 0001 # max_locals |
| 42 | 00000003 # code_length |
| 43 | b1 # 0000: return |
| 44 | b1 # 0001: return |
| 45 | b1 # 0002: return |
| 46 | 0003 # exception_table_length |
| 47 | 0000 0002 0002 000a # 0000..0002 -> 0002 java/lang/Error |
| 48 | 0000 0001 0001 000b # 0000..0001 -> 0001 java/lang/Exception |
| 49 | 0001 0002 0002 0000 # 0001..0002 -> 0002 <any> |
| 50 | 0000 # attributes_count |
| 51 | |
| 52 | 0000 # attributes_count |