• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# sample small-but-valid classfile
3#
4
5cafe babe  # magic
60000       # minor_version
7002e       # major_version
8000a       # constant_pool_count
9
10#
11# constant_pool
12#
130a 0003 0007               # 0001: method[0003, 0007]
1407 0008                    # 0002: class[0008]
1507 0009                    # 0003: class[0009]
1601 0006 "<init>"           # 0004: utf8["<init>"]
1701 0003 "()V"              # 0005: utf8["()V"]
1801 0004 "Code"             # 0006: utf8["Code"]
190c 0004 0005               # 0007: nat[0004, 0005]
2001 0005 "Small"            # 0008: utf8["Small"]
2101 0010 "java/lang/Object" # 0009: utf8["java/lang/Object"]
22
230021  # access_flags
240002  # this_class
250003  # super_class
260000  # interfaces_count
270000  # fields_count
280001  # methods_count
29
30#
31# methods[0]
32#
330001  # access_flags
340004  # name
350005  # descriptor
360001  # attributes_count
37# attributes[0]
380006       # name
390000 0011  # length
400001       # max_stack
410001       # max_locals
420000 0005  # code_length
432a         # 0000: aload_0
44b7 0001    # 0001: invokespecial method[java/lang/Object.<init>:()V]
45b1         # 0004: return
460000       # exception_table_length
470000       # attributes_count
48
490000  # attributes_count
50