sun.misc.Unsafe.objectFieldOffset0()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(3.4k)|赞(0)|评价(0)|浏览(167)

本文整理了Java中sun.misc.Unsafe.objectFieldOffset0()方法的一些代码示例,展示了Unsafe.objectFieldOffset0()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unsafe.objectFieldOffset0()方法的具体详情如下:
包路径:sun.misc.Unsafe
类名称:Unsafe
方法名:objectFieldOffset0

Unsafe.objectFieldOffset0介绍

[英]Helper for #objectFieldOffset, which does all the work, assuming the parameter is deemed valid.
[中]#objectFieldOffset的助手,假设参数被视为有效,它将完成所有工作。

代码示例

代码示例来源:origin: robovm/robovm

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: MobiVM/robovm

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: FlexoVM/flexovm

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: com.bugvm/bugvm-rt

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: com.gluonhq/robovm-rt

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: ibinti/bugvm

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

代码示例来源:origin: com.mobidevelop.robovm/robovm-rt

/**
 * Gets the raw byte offset from the start of an object's memory to
 * the memory used to store the indicated instance field.
 *
 * @param field non-null; the field in question, which must be an
 * instance field
 * @return the offset to the field
 */
public long objectFieldOffset(Field field) {
  if (Modifier.isStatic(field.getModifiers())) {
    throw new IllegalArgumentException(
        "valid for instance fields only");
  }
  return objectFieldOffset0(field);
}

相关文章

微信公众号

最新文章

更多

Unsafe类方法