private static com.kenai.jffi.Type cacheFFIType(Type type) { Object ffiType; synchronized (type) { if ((ffiType = type.getFFIHandle()) instanceof com.kenai.jffi.Type) { return (com.kenai.jffi.Type) ffiType; } if (type instanceof Type.Builtin || type instanceof CallbackInfo) { ffiType = FFIUtil.getFFIType(type.getNativeType()); } else if (type instanceof org.jruby.ext.ffi.StructLayout) { ffiType = FFIUtil.newStruct((org.jruby.ext.ffi.StructLayout) type); } else if (type instanceof org.jruby.ext.ffi.StructByValue) { ffiType = FFIUtil.newStruct(((org.jruby.ext.ffi.StructByValue) type).getStructLayout()); } else if (type instanceof org.jruby.ext.ffi.Type.Array) { ffiType = FFIUtil.newArray((org.jruby.ext.ffi.Type.Array) type); } else if (type instanceof org.jruby.ext.ffi.MappedType) { ffiType = FFIUtil.getFFIType(((org.jruby.ext.ffi.MappedType) type).getRealType()); } else { return null; } type.setFFIHandle(ffiType); } return (com.kenai.jffi.Type) ffiType; }
private static com.kenai.jffi.Type cacheFFIType(Type type) { Object ffiType; synchronized (type) { if ((ffiType = type.getFFIHandle()) instanceof com.kenai.jffi.Type) { return (com.kenai.jffi.Type) ffiType; } if (type instanceof Type.Builtin || type instanceof CallbackInfo) { ffiType = FFIUtil.getFFIType(type.getNativeType()); } else if (type instanceof org.jruby.ext.ffi.StructLayout) { ffiType = FFIUtil.newStruct((org.jruby.ext.ffi.StructLayout) type); } else if (type instanceof org.jruby.ext.ffi.StructByValue) { ffiType = FFIUtil.newStruct(((org.jruby.ext.ffi.StructByValue) type).getStructLayout()); } else if (type instanceof org.jruby.ext.ffi.Type.Array) { ffiType = FFIUtil.newArray((org.jruby.ext.ffi.Type.Array) type); } else if (type instanceof org.jruby.ext.ffi.MappedType) { ffiType = FFIUtil.getFFIType(((org.jruby.ext.ffi.MappedType) type).getRealType()); } else { return null; } type.setFFIHandle(ffiType); } return (com.kenai.jffi.Type) ffiType; }
private static com.kenai.jffi.Type cacheFFIType(Type type) { Object ffiType; synchronized (type) { if ((ffiType = type.getFFIHandle()) instanceof com.kenai.jffi.Type) { return (com.kenai.jffi.Type) ffiType; } if (type instanceof Type.Builtin || type instanceof CallbackInfo) { ffiType = FFIUtil.getFFIType(type.getNativeType()); } else if (type instanceof org.jruby.ext.ffi.StructLayout) { ffiType = FFIUtil.newStruct((org.jruby.ext.ffi.StructLayout) type); } else if (type instanceof org.jruby.ext.ffi.StructByValue) { ffiType = FFIUtil.newStruct(((org.jruby.ext.ffi.StructByValue) type).getStructLayout()); } else if (type instanceof org.jruby.ext.ffi.Type.Array) { ffiType = FFIUtil.newArray((org.jruby.ext.ffi.Type.Array) type); } else if (type instanceof org.jruby.ext.ffi.MappedType) { ffiType = FFIUtil.getFFIType(((org.jruby.ext.ffi.MappedType) type).getRealType()); } else { return null; } type.setFFIHandle(ffiType); } return (com.kenai.jffi.Type) ffiType; }
private static com.kenai.jffi.Type cacheFFIType(Type type) { Object ffiType; synchronized (type) { if ((ffiType = type.getFFIHandle()) instanceof com.kenai.jffi.Type) { return (com.kenai.jffi.Type) ffiType; } if (type instanceof Type.Builtin || type instanceof CallbackInfo) { ffiType = FFIUtil.getFFIType(type.getNativeType()); } else if (type instanceof org.jruby.ext.ffi.StructLayout) { ffiType = FFIUtil.newStruct((org.jruby.ext.ffi.StructLayout) type); } else if (type instanceof org.jruby.ext.ffi.StructByValue) { ffiType = FFIUtil.newStruct(((org.jruby.ext.ffi.StructByValue) type).getStructLayout()); } else if (type instanceof org.jruby.ext.ffi.Type.Array) { ffiType = FFIUtil.newArray((org.jruby.ext.ffi.Type.Array) type); } else if (type instanceof org.jruby.ext.ffi.MappedType) { ffiType = FFIUtil.getFFIType(((org.jruby.ext.ffi.MappedType) type).getRealType()); } else { return null; } type.setFFIHandle(ffiType); } return (com.kenai.jffi.Type) ffiType; }