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