|| NativeMapped.class.isAssignableFrom(fieldType) || fieldType.isArray()) ? getFieldValue(structField.field) : null;
Object value = getFieldValue(structField.field);
Object value = getFieldValue(structField.field); if (value == null && type.isArray()) { if (force) {
Object value = getFieldValue(sf.field); String type = format(sf.type); String index = "";
/** Override to supply native type information for the given field. * @param f internal field representation * @return Native pointer to the corresponding type information */ Pointer getFieldTypeInfo(StructField f) { Class<?> type = f.type; Object value = getFieldValue(f.field); if (typeMapper != null) { ToNativeConverter nc = typeMapper.getToNativeConverter(type); if (nc != null) { type = nc.nativeType(); value = nc.toNative(value, new ToNativeContext()); } } return FFIType.get(value, type); }
private FFIType(Structure ref) { Pointer[] els; ref.ensureAllocated(true); if (ref instanceof Union) { StructField sf = ((Union)ref).typeInfoField(); els = new Pointer[] { get(ref.getFieldValue(sf.field), sf.type), null, }; } else { els = new Pointer[ref.fields().size() + 1]; int idx = 0; for (StructField sf : ref.fields().values()) { els[idx++] = ref.getFieldTypeInfo(sf); } } init(els); } // Represent fixed-size arrays as structures of N identical elements
|| NativeMapped.class.isAssignableFrom(fieldType) || fieldType.isArray()) ? getFieldValue(structField.field) : null;
Object value = getFieldValue(structField.field);
Object value = getFieldValue(sf.field); String type = format(sf.type); String index = "";
/** Override to supply native type information for the given field. * @param f internal field representation * @return Native pointer to the corresponding type information */ Pointer getFieldTypeInfo(StructField f) { Class<?> type = f.type; Object value = getFieldValue(f.field); if (typeMapper != null) { ToNativeConverter nc = typeMapper.getToNativeConverter(type); if (nc != null) { type = nc.nativeType(); value = nc.toNative(value, new ToNativeContext()); } } return FFIType.get(value, type); }
private FFIType(Structure ref) { Pointer[] els; ref.ensureAllocated(true); if (ref instanceof Union) { StructField sf = ((Union)ref).typeInfoField(); els = new Pointer[] { get(ref.getFieldValue(sf.field), sf.type), null, }; } else { els = new Pointer[ref.fields().size() + 1]; int idx = 0; for (StructField sf : ref.fields().values()) { els[idx++] = ref.getFieldTypeInfo(sf); } } init(els); } // Represent fixed-size arrays as structures of N identical elements
Object value = getFieldValue(structField.field); if (value == null && type.isArray()) { if (force) {