Class: Rasm::Java::ConstantType

Inherits:
Struct
  • Object
show all
Defined in:
lib/rasm/java/constant_type.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



6
7
8
# File 'lib/rasm/java/constant_type.rb', line 6

def name
  @name
end

#ruleObject

Returns the value of attribute rule

Returns:

  • (Object)

    the current value of rule



6
7
8
# File 'lib/rasm/java/constant_type.rb', line 6

def rule
  @rule
end

#tagObject

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



6
7
8
# File 'lib/rasm/java/constant_type.rb', line 6

def tag
  @tag
end

Class Method Details

.ref(name, tag, len) ⇒ Object



21
22
23
# File 'lib/rasm/java/constant_type.rb', line 21

def ref(name, tag, len)
  ConstantType.new(name, tag, ref_lambda(name, tag, len))
end

.val(name, tag, len, flag) ⇒ Object



17
18
19
# File 'lib/rasm/java/constant_type.rb', line 17

def val(name, tag, len, flag)
  ConstantType.new(name, tag, val_lambda(name, tag, len, flag))
end

Instance Method Details

#value(val) ⇒ Object



8
9
10
# File 'lib/rasm/java/constant_type.rb', line 8

def value(val)
  {tag: tag, name: name, val: val}
end

#value_at(io) ⇒ Object



12
13
14
# File 'lib/rasm/java/constant_type.rb', line 12

def value_at(io)
  rule.call(io)
end