• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# sample small-but-valid classfile
3#
4
5cafe babe  # magic
60000       # minor_version
7002e       # major_version
8000c       # constant_pool_count
9
10#
11# constant_pool
12#
1307 0003                       # 0001: class[Small]
1407 0004                       # 0002: class[java/lang/Object]
1501 0005 "Small"               # 0003: utf8["Small"]
1601 0010 "java/lang/Object"    # 0004: utf8["java/lang/Object"]
1701 0005 "blort"               # 0005: utf8["blort"]
1801 0003 "()V"                 # 0006: utf8["()V"]
1901 0004 "Code"                # 0007: utf8["Code"]
2001 000f "java/lang/Error"     # 0008: utf8["java/lang/Error"]
2101 0013 "java/lang/Exception" # 0009: utf8["java/lang/Exception"]
2207 0008                       # 000a: class[java/lang/Error]
2307 0009                       # 000b: class[java/lang/Exception]
24
250001  # access_flags
260001  # this_class
270002  # super_class
280000  # interfaces_count
290000  # fields_count
300001  # methods_count
31
32# methods[0]
330001  # access_flags
340005  # name
350006  # descriptor
360001  # attributes_count
37# attributes[0]
380007      # name
3900000027  # length
400001      # max_stack
410001      # max_locals
4200000003  # code_length
43b1        # 0000: return
44b1        # 0001: return
45b1        # 0002: return
460003      # exception_table_length
470000 0002 0002 000a  # 0000..0002 -> 0002 java/lang/Error
480000 0001 0001 000b  # 0000..0001 -> 0001 java/lang/Exception
490001 0002 0002 0000  # 0001..0002 -> 0002 <any>
500000      # attributes_count
51
520000  # attributes_count
53