jSTypedArrayTypeToCEnum static method
enum JSTypedArrayType to C enum
Implementation
static int jSTypedArrayTypeToCEnum(JSTypedArrayType type) {
switch (type) {
case JSTypedArrayType.kJSTypedArrayTypeInt8Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeInt8Array;
case JSTypedArrayType.kJSTypedArrayTypeInt16Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeInt16Array;
case JSTypedArrayType.kJSTypedArrayTypeInt32Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeInt32Array;
case JSTypedArrayType.kJSTypedArrayTypeUint8Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeUint8Array;
case JSTypedArrayType.kJSTypedArrayTypeUint8ClampedArray:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeUint8ClampedArray;
case JSTypedArrayType.kJSTypedArrayTypeUint16Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeUint16Array;
case JSTypedArrayType.kJSTypedArrayTypeUint32Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeUint32Array;
case JSTypedArrayType.kJSTypedArrayTypeFloat32Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeFloat32Array;
case JSTypedArrayType.kJSTypedArrayTypeFloat64Array:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeFloat64Array;
case JSTypedArrayType.kJSTypedArrayTypeArrayBuffer:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeArrayBuffer;
default:
return JSValueRef.JSTypedArrayType.kJSTypedArrayTypeNone;
}
}