Home | History | Annotate | Download | only in 018-method-attrib-Exceptions
      1 #
      2 # sample small-but-valid classfile
      3 #
      4 
      5 cafe babe  # magic
      6 0000       # minor_version
      7 002e       # major_version
      8 000a       # 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 000a "Exceptions"       # 0007: utf8["Exceptions"]
     20 01 000f "java/lang/Error"  # 0008: utf8["java/lang/Error"]
     21 07 0008                    # 0009: class[java/lang/Error]
     22 
     23 0001  # access_flags
     24 0001  # this_class
     25 0002  # super_class
     26 0000  # interfaces_count
     27 0000  # fields_count
     28 0001  # methods_count
     29 
     30 # methods[0]
     31 0401  # access_flags
     32 0005  # name
     33 0006  # descriptor
     34 0001  # attributes_count
     35 # attributes[0]
     36 0007      # name
     37 00000004  # length
     38 0001      # number_of_exceptions
     39 0009      # class[java/lang/Error]
     40 
     41 0000  # attributes_count
     42