/** * Retrieve the variable access for write. * * @param tableMgr the VariableTableManager for which to allocate an * accessor, if it has not already been allocated. * @return the variable accessor appropriate for writes. */ public VariableAccessor getVariableAccessorForWrite(VariableTableManager tableMgr) { return variableAccessor != VariableAccessor.DUMMY_ACCESSOR ? variableAccessor : allocateVariableAccessor(tableMgr); }
/** * Retrieve the read accessor for FFI handle. If no object_id has been prepared, this will return a dummy * accessor that just returns null. * * @return the read accessor for FFI handle */ public VariableAccessor getFFIHandleAccessorForRead() { return ffiHandleVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for object group. * * @return the write accessor for object group */ public VariableAccessor getObjectGroupAccessorForWrite() { if (hasObjectspaceGroup == 0) hasObjectspaceGroup = 1; return objectGroupVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Get the object_id from a given RubyBasicObject, possibly allocating * space for it. * * @param self the object from which to get object_id * @return the object's object_id (possibly new) */ public long getObjectId(RubyBasicObject self) { VariableAccessor objectIdAccessor = getObjectIdAccessorField().getVariableAccessorForRead(); Long id = (Long)objectIdAccessor.get(self); if (id != null) return id; synchronized (self) { objectIdAccessor = getObjectIdAccessorField().getVariableAccessorForRead(); id = (Long)objectIdAccessor.get(self); if (id != null) return id; return initObjectId(self, getObjectIdAccessorField().getVariableAccessorForWrite(this)); } }
/** * Get the object_id from a given RubyBasicObject, possibly allocating * space for it. * * @param self the object from which to get object_id * @return the object's object_id (possibly new) */ public long getObjectId(RubyBasicObject self) { VariableAccessor objectIdAccessor = getObjectIdAccessorField().getVariableAccessorForRead(); Long id = (Long)objectIdAccessor.get(self); if (id != null) return id; synchronized (self) { objectIdAccessor = getObjectIdAccessorField().getVariableAccessorForRead(); id = (Long)objectIdAccessor.get(self); if (id != null) return id; return initObjectId(self, getObjectIdAccessorField().getVariableAccessorForWrite(this)); } }
/** * Retrieve the read accessor for FFI handle. * * @return the read accessor for FFI handle */ public VariableAccessor getFFIHandleAccessorForRead() { return ffiHandleVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for FFI handle. * * @return the write accessor for FFI handle */ public VariableAccessor getFFIHandleAccessorForWrite() { return ffiHandleVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Retrieve the variable access for write. * * @param tableMgr the VariableTableManager for which to allocate an * accessor, if it has not already been allocated. * @return the variable accessor appropriate for writes. */ public VariableAccessor getVariableAccessorForWrite(VariableTableManager tableMgr) { return variableAccessor != VariableAccessor.DUMMY_ACCESSOR ? variableAccessor : allocateVariableAccessor(tableMgr); }
/** * Retrieve the read accessor for object_id for reads. If no object_id has been prepared, this will return a dummy * accessor that just returns null. * * @return the read accessor for object_id */ public VariableAccessor getObjectIdAccessorForRead() { return objectIdVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for FFI handle. * * @return the write accessor for FFI handle */ public VariableAccessor getFFIHandleAccessorForWrite() { return ffiHandleVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Retrieve the variable access for write. * * @param tableMgr the VariableTableManager for which to allocate an * accessor, if it has not already been allocated. * @return the variable accessor appropriate for writes. */ public VariableAccessor getVariableAccessorForWrite(VariableTableManager tableMgr) { return variableAccessor != VariableAccessor.DUMMY_ACCESSOR ? variableAccessor : allocateVariableAccessor(tableMgr); }
/** * Retrieve the read accessor for FFI handle. If no object_id has been prepared, this will return a dummy * accessor that just returns null. * * @return the read accessor for FFI handle */ public VariableAccessor getFFIHandleAccessorForRead() { return ffiHandleVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for object group. * * @return the write accessor for object group */ public VariableAccessor getObjectGroupAccessorForWrite() { if (hasObjectspaceGroup == 0) hasObjectspaceGroup = 1; return objectGroupVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Retrieve the variable access for write. * * @param tableMgr the VariableTableManager for which to allocate an * accessor, if it has not already been allocated. * @return the variable accessor appropriate for writes. */ public VariableAccessor getVariableAccessorForWrite(VariableTableManager tableMgr) { return variableAccessor != VariableAccessor.DUMMY_ACCESSOR ? variableAccessor : allocateVariableAccessor(tableMgr); }
/** * Retrieve the read accessor for object group. If no object_id has been prepared, this will return a dummy * accessor that just returns null. * * @return the read accessor for object group */ public VariableAccessor getObjectGroupAccessorForRead() { return objectGroupVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for object group. * * @return the write accessor for object group */ public VariableAccessor getObjectGroupAccessorForWrite() { return objectGroupVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Retrieve the read accessor for C ext handle. * * @return the read accessor for C ext handle */ public VariableAccessor getNativeHandleAccessorForRead() { return cextHandleVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for C ext handle. * * @return the write accessor for C ext handle */ public VariableAccessor getNativeHandleAccessorForWrite() { return cextHandleVariableAccessorField.getVariableAccessorForWrite(this); }
/** * Retrieve the read accessor for C ext handle. * * @return the read accessor for C ext handle */ public VariableAccessor getNativeHandleAccessorForRead() { return cextHandleVariableAccessorField.getVariableAccessorForRead(); }
/** * Retrieve the write accessor for object group. * * @return the write accessor for object group */ public VariableAccessor getObjectGroupAccessorForWrite() { return objectGroupVariableAccessorField.getVariableAccessorForWrite(this); }