Class: Android::Resource::ResTableEntry
- Defined in:
- lib/android/resource.rb
Direct Known Subclasses
Constant Summary collapse
- NO_ENTRY =
- 0xFFFFFFFF
- FLAG_COMPLEX =
          If set, this is a complex entry, holding a set of name/value mappings. It is followed by an array of ResTable_map structures. 
- 0x01
- FLAG_PUBLIC =
          If set, this resource has been declared public, so libraries are allowed to reference it. 
- 0x02
Instance Attribute Summary collapse
- 
  
    
      #key  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute key. 
- 
  
    
      #size  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute size. 
- 
  
    
      #val  ⇒ Object 
    
    
  
  
  
  
    
      readonly
    
    
  
  
  
  
  
  
    Returns the value of attribute val. 
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Chunk
#current_position, #exec_parse, #initialize, #read_int16, #read_int32, #read_int8
Constructor Details
This class inherits a constructor from Android::Resource::Chunk
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
| 399 400 401 | # File 'lib/android/resource.rb', line 399 def key @key end | 
#size ⇒ Object (readonly)
Returns the value of attribute size.
| 399 400 401 | # File 'lib/android/resource.rb', line 399 def size @size end | 
#val ⇒ Object (readonly)
Returns the value of attribute val.
| 399 400 401 | # File 'lib/android/resource.rb', line 399 def val @val end | 
Class Method Details
.read_entry(data, offset) ⇒ ResTableEntry, ResTableMapEntry
| 383 384 385 386 387 388 389 390 | # File 'lib/android/resource.rb', line 383 def self.read_entry(data, offset) flag = data[offset + 2, 2].unpack('v')[0] if flag & ResTableEntry::FLAG_COMPLEX == 0 ResTableEntry.new(data, offset) else ResTableMapEntry.new(data, offset) end end | 
Instance Method Details
#inspect ⇒ Object
| 408 409 410 | # File 'lib/android/resource.rb', line 408 def inspect "<ResTableEntry @size=#{@size}, @key=#{@key} @flag=#{@flag}>" end |