Class: JvmBytecode::Attributes::SourceFile
- Inherits:
-
Attribute
- Object
- Attribute
- JvmBytecode::Attributes::SourceFile
show all
- Defined in:
- lib/jvm_bytecode/attributes/source_file.rb
Instance Attribute Summary
Attributes inherited from Attribute
#cp
Instance Method Summary
collapse
Methods inherited from Attribute
#bytecode, decode_serial, define, fetch, #initialize, locatable_at
Instance Method Details
#additional_bytecode ⇒ Object
10
11
12
|
# File 'lib/jvm_bytecode/attributes/source_file.rb', line 10
def additional_bytecode
[@filename].pack('S>')
end
|
#decode(io) ⇒ Object
14
15
16
17
|
# File 'lib/jvm_bytecode/attributes/source_file.rb', line 14
def decode(io)
io.read(4)
@filename = io.read(2).unpack('S>').first
end
|
#filename(f) ⇒ Object
6
7
8
|
# File 'lib/jvm_bytecode/attributes/source_file.rb', line 6
def filename(f)
@filename = cp.index_or_utf8(f)
end
|
#to_hash ⇒ Object
19
20
21
|
# File 'lib/jvm_bytecode/attributes/source_file.rb', line 19
def to_hash
{}
end
|