public class Arguments
extends java.lang.Object
| Constructor and Description |
|---|
Arguments() |
| Modifier and Type | Method and Description |
|---|---|
static WritableArray |
createArray()
This method should be used when you need to stub out creating NativeArrays in unit tests.
|
static WritableMap |
createMap()
This method should be used when you need to stub out creating NativeMaps in unit tests.
|
static WritableArray |
fromArray(java.lang.Object array)
Convert an array to a
WritableArray. |
static WritableMap |
fromBundle(android.os.Bundle bundle)
Convert a
Bundle to a WritableMap. |
static WritableNativeArray |
fromJavaArgs(java.lang.Object[] args) |
static android.os.Bundle |
toBundle(ReadableMap readableMap)
Convert a
WritableMap to a Bundle. |
public static WritableArray createArray()
public static WritableMap createMap()
public static WritableNativeArray fromJavaArgs(java.lang.Object[] args)
public static WritableArray fromArray(java.lang.Object array)
WritableArray.array - the array to convert. Supported types are: String[], Bundle[],
int[], float[], double[], boolean[].WritableArrayjava.lang.IllegalArgumentException - if the passed object is none of the above typespublic static WritableMap fromBundle(android.os.Bundle bundle)
Bundle to a WritableMap. Supported key types in the bundle
are:
fromArray(Object)Bundle objects that are recursively converted to mapsbundle - the Bundle to convertWritableMapjava.lang.IllegalArgumentException - if there are keys of unsupported types@Nullable
public static android.os.Bundle toBundle(@Nullable
ReadableMap readableMap)
WritableMap to a Bundle.readableMap - the WritableMap to convert.Bundle.