Class: SmaliField
- Inherits:
-
Object
- Object
- SmaliField
- Defined in:
- lib/dex-oracle/smali_field.rb
Instance Attribute Summary collapse
-
#class ⇒ Object
readonly
Returns the value of attribute class.
-
#descriptor ⇒ Object
readonly
Returns the value of attribute descriptor.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(class_name, field_signature) ⇒ SmaliField
constructor
A new instance of SmaliField.
- #state ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(class_name, field_signature) ⇒ SmaliField
Returns a new instance of SmaliField.
4 5 6 7 8 |
# File 'lib/dex-oracle/smali_field.rb', line 4 def initialize(class_name, field_signature) @class = class_name @descriptor = "#{class_name}->#{field_signature}" @name, @type = field_signature.split(':') end |
Instance Attribute Details
#class ⇒ Object (readonly)
Returns the value of attribute class.
2 3 4 |
# File 'lib/dex-oracle/smali_field.rb', line 2 def class @class end |
#descriptor ⇒ Object (readonly)
Returns the value of attribute descriptor.
2 3 4 |
# File 'lib/dex-oracle/smali_field.rb', line 2 def descriptor @descriptor end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
2 3 4 |
# File 'lib/dex-oracle/smali_field.rb', line 2 def name @name end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
2 3 4 |
# File 'lib/dex-oracle/smali_field.rb', line 2 def type @type end |
Instance Method Details
#==(other) ⇒ Object
14 15 16 |
# File 'lib/dex-oracle/smali_field.rb', line 14 def ==(other) other.class == self.class && other.state == state end |
#state ⇒ Object
18 19 20 |
# File 'lib/dex-oracle/smali_field.rb', line 18 def state [@name, @class, @type, @descriptor] end |
#to_s ⇒ Object
10 11 12 |
# File 'lib/dex-oracle/smali_field.rb', line 10 def to_s @descriptor end |