android :: NativeBundle :: clear
android :: NativeBundle :: clone
android :: NativeBundle :: contains_key
android :: NativeBundle :: defaultinit
android :: NativeBundle :: get
android :: NativeBundle :: get_boolean
android :: NativeBundle :: get_bundle
android :: NativeBundle :: get_byte
android :: NativeBundle :: get_char
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_char_array
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_char_with_def_value
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_double
android :: NativeBundle :: get_float
android :: NativeBundle :: get_int
android :: NativeBundle :: get_int_array
android :: NativeBundle :: get_long
android :: NativeBundle :: get_long_array
FIXME: Get rid of the int cast as soon as the ffi is fixedandroid :: NativeBundle :: get_short
android :: NativeBundle :: get_string
android :: NativeBundle :: is_empty
android :: NativeBundle :: key_set
android :: NativeBundle :: new
android :: NativeBundle :: put_all
android :: NativeBundle :: put_boolean
android :: NativeBundle :: put_bundle
android :: NativeBundle :: put_byte
android :: NativeBundle :: put_char
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: put_char_array
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: put_double
android :: NativeBundle :: put_float
android :: NativeBundle :: put_int
android :: NativeBundle :: put_int_array
android :: NativeBundle :: put_long
android :: NativeBundle :: put_short
android :: NativeBundle :: put_string
android :: NativeBundle :: remove
android :: NativeBundle :: size
android :: NativeBundle :: to_string
android $ NativeBundle :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
android :: NativeBundle :: clear
android :: NativeBundle :: clone
android :: NativeBundle :: contains_key
core :: Object :: defaultinit
android :: NativeBundle :: defaultinit
core :: Pointer :: defaultinit
jvm :: JavaObject :: defaultinit
android :: NativeBundle :: get
android :: NativeBundle :: get_boolean
android :: NativeBundle :: get_bundle
android :: NativeBundle :: get_byte
android :: NativeBundle :: get_char
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_char_array
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_char_with_def_value
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: get_double
android :: NativeBundle :: get_float
android :: NativeBundle :: get_int
android :: NativeBundle :: get_int_array
android :: NativeBundle :: get_long
android :: NativeBundle :: get_long_array
FIXME: Get rid of the int cast as soon as the ffi is fixedandroid :: NativeBundle :: get_short
android :: NativeBundle :: get_string
android :: NativeBundle :: is_empty
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
android :: NativeBundle :: key_set
android :: NativeBundle :: new
jvm :: JavaObject :: new_global_ref
Returns a global reference to the Java object behind this referencecore :: Object :: output_class_name
Display class name on stdout (debug only).jvm :: JavaObject :: pop_from_local_frame
Pops the current local reference frame and return a valid reference to selfjvm :: JavaObject :: pop_from_local_frame_with_env
Java implementation ofpop_from_local_frame
android :: NativeBundle :: put_all
android :: NativeBundle :: put_boolean
android :: NativeBundle :: put_bundle
android :: NativeBundle :: put_byte
android :: NativeBundle :: put_char
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: put_char_array
FIXME: Java'schar
are encoded on 16-bits whereas Nit's are on 8-bits.
android :: NativeBundle :: put_double
android :: NativeBundle :: put_float
android :: NativeBundle :: put_int
android :: NativeBundle :: put_int_array
android :: NativeBundle :: put_long
android :: NativeBundle :: put_short
android :: NativeBundle :: put_string
android :: NativeBundle :: remove
android :: NativeBundle :: size
jvm :: JavaObject :: to_java_string
JavaString
representation of self
using Java's toString
android :: NativeBundle :: to_string
extern class NativeBundle in "Java" `{ android.os.Bundle `}
super JavaObject
new in "Java" `{ return new Bundle(); `}
fun clone: JavaObject in "Java" `{ return self.clone(); `}
fun size: Int in "Java" `{ return self.size(); `}
fun is_empty: Bool in "Java" `{ return self.isEmpty(); `}
fun clear in "Java" `{ self.clear(); `}
fun contains_key(key: JavaString): Bool in "Java" `{ return self.containsKey(key); `}
fun get(key: JavaString): JavaObject in "Java" `{ return self.get(key); `}
fun remove(key: JavaString) in "Java" `{ self.remove(key); `}
fun put_all(bundle: NativeBundle) in "Java" `{ self.putAll(bundle); `}
fun key_set: HashSet[JavaString] import HashSet[JavaString],
HashSet[JavaString].add in "Java" `{
Set<String> java_set = self.keySet();
NitObject nit_hashset = new_HashSet_of_JavaString();
for (String element: java_set)
HashSet_of_JavaString_add(nit_hashset, element);
return nit_hashset;
`}
fun has_file_descriptors: Bool in "Java" `{ return self.hasFileDescriptors(); `}
fun put_boolean(key: JavaString, value: Bool) in "Java" `{
self.putBoolean(key, value);
`}
fun put_byte(key: JavaString, value: Int) in "Java" `{
self.putByte(key, (byte) value);
`}
# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
fun put_char(key: JavaString, value: Char) in "Java" `{
self.putChar(key, (char)value);
`}
fun put_short(key: JavaString, value: Int) in "Java" `{
self.putShort(key, (short) value);
`}
fun put_int(key: JavaString, value: Int) in "Java" `{
self.putInt(key, (int) value);
`}
fun put_long(key: JavaString, value: Int) in "Java" `{
self.putLong(key, value);
`}
fun put_float(key: JavaString, value: Float) in "Java" `{
self.putFloat(key, (float) value);
`}
fun put_double(key: JavaString, value: Float) in "Java" `{
self.putDouble(key, value);
`}
fun put_string(key: JavaString, value: JavaString) in "Java" `{
self.putString(key, value);
`}
fun put_char_sequence(key: JavaString, value: JavaString) in "Java" `{
self.putCharSequence(key, value);
`}
fun put_integer_array_list(key: JavaString, value: Array[Int])
import Array[Int].length, Array[Int].[] in "Java" `{
ArrayList<Integer> java_array =
new ArrayList<Integer>((int) Array_of_Int_length(value));
for(int i=0; i < java_array.size(); ++i)
java_array.add((int) Array_of_Int__index(value, i));
self.putIntegerArrayList(key, java_array);
`}
fun put_string_array_list(key: JavaString, value: Array[JavaString])
import Array[JavaString].length, Array[JavaString].[] in "Java" `{
ArrayList<String> java_array = new ArrayList<String>((int)Array_of_JavaString_length(value));
for(int i=0; i < java_array.size(); ++i)
java_array.add(Array_of_JavaString__index(value, i));
self.putStringArrayList(key, java_array);
`}
fun put_char_sequence_array_list(key: JavaString, value: Array[JavaString])
import Array[JavaString].length, Array[JavaString].[] in "Java" `{
ArrayList<CharSequence> java_array =
new ArrayList<CharSequence>((int)Array_of_JavaString_length(value));
for(int i=0; i < java_array.size(); ++i)
java_array.add(Array_of_JavaString__index(value, i));
self.putCharSequenceArrayList(key, java_array);
`}
fun put_boolean_array(key: JavaString, value: Array[Bool])
import Array[Bool].length, Array[Bool].[] in "Java" `{
boolean[] java_array = new boolean[(int)Array_of_Bool_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = Array_of_Bool__index(value, i);
self.putBooleanArray(key, java_array);
`}
fun put_byte_array(key: JavaString, value: Array[Int])
import Array[Int].length, Array[Int].[] in "Java" `{
byte[] java_array = new byte[(int)Array_of_Int_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = (byte) Array_of_Int__index(value, i);
self.putByteArray(key, java_array);
`}
fun put_short_array(key: JavaString, value: Array[Int])
import Array[Int].length, Array[Int].[] in "Java" `{
short[] java_array = new short[(int)Array_of_Int_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = (short) Array_of_Int__index(value, i);
self.putShortArray(key, java_array);
`}
# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
fun put_char_array(key: JavaString, value: Array[Char])
import Array[Char].length, Array[Char].[] in "Java" `{
char[] java_array = new char[(int)Array_of_Char_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = (char)Array_of_Char__index(value, i);
self.putCharArray(key, java_array);
`}
fun put_int_array(key: JavaString, value: Array[Int])
import Array[Int].length, Array[Int].[] in "Java" `{
int[] java_array = new int[(int)Array_of_Int_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = (int) Array_of_Int__index(value, i);
self.putIntArray(key, java_array);
`}
fun put_long_array(key: JavaString, value: Array[Int])
import Array[Int].length, Array[Int].[] in "Java" `{
long[] java_array = new long[(int)Array_of_Int_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = Array_of_Int__index(value, i);
self.putLongArray(key, java_array);
`}
fun put_float_array(key: JavaString, value: Array[Float])
import Array[Float].length, Array[Float].[] in "Java" `{
float[] java_array = new float[(int)Array_of_Float_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = (float) Array_of_Float__index(value, i);
self.putFloatArray(key, java_array);
`}
fun put_double_array(key: JavaString, value: Array[Float])
import Array[Float].length, Array[Float].[] in "Java" `{
double[] java_array = new double[(int)Array_of_Float_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = Array_of_Float__index(value, i);
self.putDoubleArray(key, java_array);
`}
fun put_string_array(key: JavaString, value: Array[JavaString])
import Array[JavaString].length, Array[JavaString].[] in "Java" `{
String[] java_array = new String[(int)Array_of_JavaString_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = Array_of_JavaString__index(value, i);
self.putStringArray(key, java_array);
`}
fun put_char_sequence_array(key: JavaString, value: Array[JavaString])
import Array[JavaString].length, Array[JavaString].[] in "Java" `{
CharSequence[] java_array = new CharSequence[(int)Array_of_JavaString_length(value)];
for(int i=0; i < java_array.length; ++i)
java_array[i] = Array_of_JavaString__index(value, i);
self.putCharSequenceArray(key, java_array);
`}
fun put_bundle(key: JavaString, value: NativeBundle) in "Java" `{
self.putBundle(key, value);
`}
fun get_boolean(key: JavaString): Bool in "Java" `{ return self.getBoolean(key); `}
fun get_boolean_with_def_value(key: JavaString, def_value: Bool): Bool in "Java" `{
return self.getBoolean(key, def_value);
`}
fun get_byte(key: JavaString): Int in "Java" `{ return self.getByte(key); `}
fun get_byte_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
return self.getByte(key, (byte) def_value);
`}
# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
fun get_char(key: JavaString): Char in "Java" `{ return (int)self.getChar(key); `}
# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
fun get_char_with_def_value(key: JavaString, def_value: Char): Char in "Java" `{
return (int)self.getChar(key, (char)def_value);
`}
fun get_short(key: JavaString): Int in "Java" `{ return (short) self.getShort(key); `}
fun get_short_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
return (short) self.getShort(key, (short) def_value);
`}
fun get_int(key: JavaString): Int in "Java" `{ return self.getInt(key); `}
fun get_int_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
return self.getInt(key, (int) def_value);
`}
fun get_long(key: JavaString): Int in "Java" `{ return self.getLong(key); `}
fun get_long_with_def_value(key: JavaString, def_value: Int): Int in "Java" `{
return self.getLong(key);
`}
fun get_float(key: JavaString): Float in "Java" `{
return (float) self.getFloat(key);
`}
fun get_float_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{
return (float) self.getFloat(key, (float) def_value);
`}
fun get_double(key: JavaString): Float in "Java" `{ return self.getDouble(key); `}
fun get_double_with_def_value(key: JavaString, def_value: Float): Float in "Java" `{
return self.getDouble(key, def_value);
`}
fun get_string(key: JavaString): JavaString in "Java" `{
return self.getString(key);
`}
fun get_char_sequence(key: JavaString): JavaString in "Java" `{
return (String) self.getCharSequence(key);
`}
fun get_bundle(key: JavaString): NativeBundle in "Java" `{
return self.getBundle(key);
`}
fun get_integer_array_list(key: JavaString): Array[Int]
import Array[Int], Array[Int].add in "Java" `{
ArrayList<Integer> java_array = self.getIntegerArrayList(key);
NitObject nit_array = new_Array_of_Int();
if (java_array == null) return nit_array;
for (int element: java_array)
Array_of_Int_add(nit_array, element);
return nit_array;
`}
fun get_string_array_list(key: JavaString): Array[String]
import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
ArrayList<String> java_array = self.getStringArrayList(key);
NitObject nit_array = new_StringCopyArray();
if (java_array == null) return nit_array;
for (String element: java_array)
StringCopyArray_add(nit_array, element);
return StringCopyArray_collection(nit_array);
`}
fun get_char_sequence_array_list(key: JavaString): Array[String]
import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
ArrayList<CharSequence> java_array = self.getCharSequenceArrayList(key);
NitObject nit_array = new_StringCopyArray();
if (java_array == null) return nit_array;
for (CharSequence element: java_array)
StringCopyArray_add(nit_array, (String) element);
return StringCopyArray_collection(nit_array);
`}
fun get_boolean_array(key: JavaString): Array[Bool]
import Array[Bool], Array[Bool].add in "Java" `{
boolean[] java_array = self.getBooleanArray(key);
NitObject nit_array = new_Array_of_Bool();
if (java_array == null) return nit_array;
for (int i=0; i < java_array.length; ++i)
Array_of_Bool_add(nit_array, java_array[i]);
return nit_array;
`}
fun get_byte_array(key: JavaString): Array[Int]
import Array[Int], Array[Int].add in "Java" `{
byte[] java_array = self.getByteArray(key);
NitObject nit_array = new_Array_of_Int();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Int_add(nit_array, java_array[i]);
return nit_array;
`}
fun get_short_array(key: JavaString): Array[Int]
import Array[Int], Array[Int].add in "Java" `{
short[] java_array = self.getShortArray(key);
NitObject nit_array = new_Array_of_Int();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Int_add(nit_array, java_array[i]);
return nit_array;
`}
# FIXME: Java's `char` are encoded on 16-bits whereas Nit's are on 8-bits.
fun get_char_array(key: JavaString): Array[Char]
import Array[Char], Array[Char].add in "Java" `{
char[] java_array = self.getCharArray(key);
NitObject nit_array = new_Array_of_Char();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Char_add(nit_array, (int)java_array[i]);
return nit_array;
`}
fun get_int_array(key: JavaString): Array[Int]
import Array[Int], Array[Int].add in "Java" `{
int[] java_array = self.getIntArray(key);
NitObject nit_array = new_Array_of_Int();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Int_add(nit_array, java_array[i]);
return nit_array;
`}
# FIXME: Get rid of the int cast as soon as the ffi is fixed
fun get_long_array(key: JavaString): Array[Int]
import Array[Int], Array[Int].add in "Java" `{
long[] java_array = self.getLongArray(key);
NitObject nit_array = new_Array_of_Int();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Int_add(nit_array, java_array[i]);
return nit_array;
`}
fun get_float_array(key: JavaString): Array[Float]
import Array[Float], Array[Float].add in "Java" `{
float[] java_array = self.getFloatArray(key);
NitObject nit_array = new_Array_of_Float();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Float_add(nit_array, (double) java_array[i]);
return nit_array;
`}
fun get_double_array(key: JavaString): Array[Float]
import Array[Float], Array[Float].add in "Java" `{
double[] java_array = self.getDoubleArray(key);
NitObject nit_array = new_Array_of_Float();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
Array_of_Float_add(nit_array, java_array[i]);
return nit_array;
`}
fun get_string_array(key: JavaString): Array[String]
import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
String[] java_array = self.getStringArray(key);
NitObject nit_array = new_StringCopyArray();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
StringCopyArray_add(nit_array, java_array[i]);
return StringCopyArray_collection(nit_array);
`}
fun get_char_sequence_array(key: JavaString): Array[String]
import StringCopyArray, StringCopyArray.add, StringCopyArray.collection in "Java" `{
CharSequence[] java_array = self.getCharSequenceArray(key);
NitObject nit_array = new_StringCopyArray();
if (java_array == null) return nit_array;
for(int i=0; i < java_array.length; ++i)
StringCopyArray_add(nit_array, (String)java_array[i]);
return StringCopyArray_collection(nit_array);
`}
fun describe_contents: Int in "Java" `{ return self.describeContents(); `}
fun to_string: JavaString in "Java" `{ return self.toString(); `}
# HACK for bug #845
redef fun new_global_ref import sys, Sys.jni_env `{
Sys sys = NativeBundle_sys(self);
JNIEnv *env = Sys_jni_env(sys);
return (*env)->NewGlobalRef(env, self);
`}
end
lib/android/bundle/bundle.nit:35,1--425,3