app/src/main/assets/python/app_packages/rubicon/java/api.py
def return_cast(raw, return_signature):
    """Convert the return value from a JNI call into a Python value.
    The raw value is the value returned by the JNI call; the value returned
    by this method will be converted to match the provided signature.
    Primitive types are returned in the right format, and are not modified.
    Strings are turned into Python unicode objects.
    Objects are provided as JNI references, which are wrapped into an
    instance of the relevant JavaClass.
    """
    if return_signature in {
        b'V',  # void
        b'Z',  # bool
        b'B',  # byte
        b'C',  # char
        b'S',  # short
        b'I',  # int
        b'J',  # long
        b'F',  # float
        b'D',  # double
    }:
        return raw

    elif return_signature == b'Ljava/lang/String;':
        # Check for NULL return values
        if raw.value:
            return java.GetStringUTFChars(cast(raw, jstring), None).decode('utf-8')
        return None

    elif return_signature.startswith(b'L'):
        # Check for NULL return values
        if raw.value:
            return JavaClass(return_signature[1:-1].decode('utf-8'))(__jni__=raw)
        return None

    raise ValueError("Don't know how to cast return signature '%s'" % return_signature)
Convert the return value from a JNI call into a Python value.
    The raw value is the value returned by the JNI call; the value returned
    by this method will be converted to match the provided signature.
    Primitive types are returned in the right format, and are not modified.
    Strings are turned into Python unicode objects.
    Objects are provided as JNI references, which are wrapped into an
    instance of the relevant JavaClass.
    
Convert the return value from a JNI call into a Python value.
The raw value is the value returned by the JNI call; the value returned
by this method will be converted to match the provided signature.
Primitive types are returned in the right format, and are not modified.
Strings are turned into Python unicode objects.
Objects are provided as JNI references, which are wrapped into an
instance of the relevant JavaClass.
Convert the return value from a JNI call into a Python value . The raw value is the value returned by the JNI call ; the value returned by this method will be converted to match the provided signature . Primitive types are returned in the right format and are not modified . Strings are turned into Python unicode objects . Objects are provided as JNI references which are wrapped into an instance of the relevant JavaClass .
def return_cast(raw, return_signature):
    if return_signature in {
        b'V',  
        b'Z',  
        b'B',  
        b'C',  
        b'S',  
        b'I',  
        b'J',  
        b'F',  
        b'D',  
    }:
        return raw
    elif return_signature == b'Ljava/lang/String;':
        if raw.value:
            return java.GetStringUTFChars(cast(raw, jstring), None).decode('utf-8')
        return None
    elif return_signature.startswith(b'L'):
        if raw.value:
            return JavaClass(return_signature[1:-1].decode('utf-8'))(__jni__=raw)
        return None
    raise ValueError("Don't know how to cast return signature '%s'" % return_signature)
def return_cast ( raw , return_signature ) : if return_signature in { b'V' , b'Z' , b'B' , b'C' , b'S' , b'I' , b'J' , b'F' , b'D' , } : return raw elif return_signature == b'Ljava/lang/String;' : if raw . value : return java . GetStringUTFChars ( cast ( raw , jstring ) , None ) . decode ( 'utf-8' ) return None elif return_signature . startswith ( b'L' ) : if raw . value : return JavaClass ( return_signature [ 1 : - 1 ] . decode ( 'utf-8' ) ) ( __jni__ = raw ) return None raise ValueError ( "Don't know how to cast return signature '%s'" % return_signature )
Convert the return value from a JNI call into a Python value.
Convert the return value from a JNI call into a Python value .
"""Convert the return value from a JNI call into a Python value.
    The raw value is the value returned by the JNI call; the value returned
    by this method will be converted to match the provided signature.
    Primitive types are returned in the right format, and are not modified.
    Strings are turned into Python unicode objects.
    Objects are provided as JNI references, which are wrapped into an
    instance of the relevant JavaClass.
    """ # void # bool # byte # char # short # int # long # float # double # Check for NULL return values # Check for NULL return values
raw
return_signature