Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jruby.ext.ffi;
 
 import org.jruby.Ruby;
 
abstract public class MemoryObject extends RubyObject {
    
The Memory I/O object
    private MemoryIO memory;
    protected MemoryObject(Ruby runtimeRubyClass metaClass) {
        super(runtimemetaClass);
    }

    
Gets the memory I/O accessor to read/write to the memory area.

Returns:
A memory accessor.
    public final MemoryIO getMemoryIO() {
        return  != null ?  : initMemoryIO();
    }

    
Replaces the native memory object backing this ruby memory object

Parameters:
memory The new memory I/O object
Returns:
The old memory I/O object
    protected final MemoryIO setMemoryIO(MemoryIO memory) {
        MemoryIO old = this.;
        this. = memory;
        return old;
    }
    private MemoryIO initMemoryIO() {
        return this. = allocateMemoryIO();
    }
    protected abstract MemoryIO allocateMemoryIO();
New to GrepCode? Check out our FAQ X