本文整理汇总了Java中som.vmobjects.SObject.NUM_OBJECT_FIELDS属性的典型用法代码示例。如果您正苦于以下问题:Java SObject.NUM_OBJECT_FIELDS属性的具体用法?Java SObject.NUM_OBJECT_FIELDS怎么用?Java SObject.NUM_OBJECT_FIELDS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类som.vmobjects.SObject
的用法示例。
在下文中一共展示了SObject.NUM_OBJECT_FIELDS属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initObjectAccessors
private static AbstractObjectAccessor[] initObjectAccessors() {
AbstractObjectAccessor[] accessors = new AbstractObjectAccessor[MAX_OBJECT_FIELDS];
try {
for (int i = 0; i < SObject.NUM_OBJECT_FIELDS; i += 1) {
Field field = SMutableObject.class.getDeclaredField("field" + (i + 1));
long offset = unsafe.objectFieldOffset(field);
accessors[i] = new DirectObjectAccessor(offset);
}
} catch (NoSuchFieldException | SecurityException e) {
throw new RuntimeException(e);
}
for (int i = SObject.NUM_OBJECT_FIELDS; i < MAX_OBJECT_FIELDS; i += 1) {
accessors[i] = new ExtensionObjectAccessor(i);
}
return accessors;
}
示例2: getNumberOfUsedExtendedObjectStorageLocations
public int getNumberOfUsedExtendedObjectStorageLocations() {
int requiredExtensionFields = objectStorageLocationsUsed - SObject.NUM_OBJECT_FIELDS;
if (requiredExtensionFields < 0) {
return 0;
}
return requiredExtensionFields;
}
示例3: ExtensionObjectAccessor
private ExtensionObjectAccessor(final int fieldIdx) {
this.extensionIndex = fieldIdx - SObject.NUM_OBJECT_FIELDS;
}
示例4: ObjectArrayStorageLocation
public ObjectArrayStorageLocation(final ObjectLayout layout, final int fieldIndex) {
super(layout, fieldIndex);
extensionIndex = fieldIndex - SObject.NUM_OBJECT_FIELDS;
}