本文整理了Java中sun.misc.Unsafe.getBoolean()
方法的一些代码示例,展示了Unsafe.getBoolean()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Unsafe.getBoolean()
方法的具体详情如下:
包路径:sun.misc.Unsafe
类名称:Unsafe
方法名:getBoolean
暂无
代码示例来源:origin: neo4j/neo4j
public static boolean getBoolean( Object obj, long offset )
{
return unsafe.getBoolean( obj, offset );
}
代码示例来源:origin: apache/ignite
/**
* Gets boolean value from byte array.
*
* @param arr Byte array.
* @param off Offset.
* @return Boolean value from byte array.
*/
public static boolean getBoolean(byte[] arr, long off) {
return UNSAFE.getBoolean(arr, off);
}
代码示例来源:origin: apache/ignite
/**
* Gets boolean value from object field.
*
* @param obj Object.
* @param fieldOff Field offset.
* @return Boolean value from object field.
*/
public static boolean getBooleanField(Object obj, long fieldOff) {
return UNSAFE.getBoolean(obj, fieldOff);
}
代码示例来源:origin: redisson/redisson
public final boolean getBooleanValue(Object obj) throws IllegalAccessException {
if (!isAndroid && memOffset >= 0) {
return FSTUtil.unFlaggedUnsafe.getBoolean(obj, memOffset);
}
return field.getBoolean(obj);
}
代码示例来源:origin: bytedeco/javacpp
@Override boolean getBoolean(byte[] array, long offset) { return UNSAFE.getBoolean(array, arrayOffset + offset); }
@Override void putBoolean(byte[] array, long offset, boolean b) { UNSAFE.putBoolean(array, arrayOffset + offset, b); }
代码示例来源:origin: apache/geode
public boolean getBoolean(Object o, long offset) {
return this.unsafe.getBoolean(o, offset);
}
代码示例来源:origin: com.google.protobuf/protobuf-java
@Override
public boolean getBoolean(Object target, long offset) {
return unsafe.getBoolean(target, offset);
}
代码示例来源:origin: apache/avro
@Override
protected Object get(Object object) {
return UNSAFE.getBoolean(object, offset);
}
代码示例来源:origin: org.apache.avro/avro
@Override
protected Object get(Object object) {
return UNSAFE.getBoolean(object, offset);
}
代码示例来源:origin: fengjiachun/Jupiter
public boolean getBoolean(Object target, long offset) {
return unsafe.getBoolean(target, offset);
}
代码示例来源:origin: fengjiachun/Jupiter
public boolean getBoolean(Object target, long offset) {
return unsafe.getBoolean(target, offset);
}
代码示例来源:origin: RuedigerMoeller/fast-serialization
public final boolean getBooleanValue(Object obj) throws IllegalAccessException {
if (!isAndroid && memOffset >= 0) {
return FSTUtil.unFlaggedUnsafe.getBoolean(obj, memOffset);
}
return field.getBoolean(obj);
}
代码示例来源:origin: apache/avro
@Override
protected void write(Object object, Encoder out) throws IOException {
out.writeBoolean(UNSAFE.getBoolean(object, offset));
}
}
代码示例来源:origin: org.apache.avro/avro
@Override
protected void write(Object object, Encoder out) throws IOException {
out.writeBoolean(UNSAFE.getBoolean(object, offset));
}
}
代码示例来源:origin: wildfly/wildfly
/**
* Get the boolean value of this field on the given object instance.
*
* @param instance the object instance (must not be {@code null}, must be of the correct type)
* @return the value of the field
* @throws ClassCastException if the field is not of the correct type
* @throws IllegalArgumentException if this instance has no reflection field set on it
*/
public boolean getBoolean(Object instance) throws ClassCastException, IllegalArgumentException {
if (instance == null) {
throw new IllegalArgumentException("instance is null");
}
if (field == null) {
throw new IllegalArgumentException();
}
field.getDeclaringClass().cast(instance);
if (field.getType() != boolean.class) {
throw new ClassCastException();
}
return unsafe.getBoolean(instance, fieldOffset);
}
代码示例来源:origin: aaberg/sql2o
public Object getProperty(Object obj) {
return theUnsafe.getBoolean(obj, offset);
}
代码示例来源:origin: webx/citrus
void serialize(AbstractHessianOutput out, Object obj)
throws IOException {
boolean value = _unsafe.getBoolean(obj, _offset);
out.writeBoolean(value);
}
}
代码示例来源:origin: webx/citrus
void serialize(AbstractHessianOutput out, Object obj)
throws IOException {
boolean value = _unsafe.getBoolean(obj, _offset);
out.writeBoolean(value);
}
}
代码示例来源:origin: Netflix/hollow
return unsafe.getBoolean(obj, fieldOffset);
case INT:
return Integer.valueOf(unsafe.getInt(obj, fieldOffset));
代码示例来源:origin: Netflix/hollow
rec.setBoolean(fieldName, unsafe.getBoolean(obj, fieldOffset));
break;
case INT:
内容来源于网络,如有侵权,请联系作者删除!