Wrap text
|
|
module Jcrb
class ClassFile
alias :__methods :methods
include Unpackable
u4 :magic
u2 :major_version
u2 :minor_version
u2 :constant_pool_count
ux :constant_pool, :type => proc { ConstantPool.new(constant_pool_count) }
u2 :access_flags
u2 :this_class
u2 :super_class
u2 :interfaces_count
u2 :interfaces, :count => :interfaces_count
u2 :fields_count
ux :fields, :type => proc { FieldInfo.new(constant_pool) },
:count => :fields_count
u2 :methods_count
ux :methods, :type => proc { MethodInfo.new(constant_pool) },
:count => :methods_count
u2 :attributes_count
ux :attributes, :type => proc { AttributeInfo.new(constant_pool) },
:count => :attributes_count
end
|