class Android::Dex::DexObject::ClassDefItem

class_def_item @see source.android.com/devices/tech/dalvik/dex-format.html @!attribute [r] class_data_item

@return [ClassDataItem] class_data_item of this class

Public Class Methods

size() click to toggle source

@return [Integer] bytes

# File lib/android/dex/dex_object.rb, line 299
def self.size
  4 * 8
end

Public Instance Methods

class_data_item() click to toggle source
# File lib/android/dex/dex_object.rb, line 303
def class_data_item
  # description of class_data_off of class_def_item.
  #   offset from the start of the file to the associated class data
  #   for this item, or 0 if there is no class data for this class.
  if @params[:class_data_off] != 0
    @class_data_item ||= ClassDataItem.new(@data, @params[:class_data_off])
  else
    nil
  end
end

Private Instance Methods

parse() click to toggle source
# File lib/android/dex/dex_object.rb, line 315
def parse
  @params[:class_idx] = read_value(:uint)
  @params[:access_flags] = read_value(:uint)
  @params[:superclass_idx] = read_value(:uint)
  @params[:interfaces_off] = read_value(:uint)
  @params[:source_file_idx] = read_value(:uint)
  @params[:annotations_off] = read_value(:uint)
  @params[:class_data_off] = read_value(:uint)
  @params[:static_values_off] = read_value(:uint) # TODO: not implemented encoded_array_item
end