def signature_for_type_name(type_name):
    """Determine the JNI signature for a given single data type.
    This means a one character representation for primitives, and an
    L<class name>; representation for classes (including String).
    """
    if type_name == b'void':
        return b'V'
    elif type_name == b'boolean':
        return b'Z'
    elif type_name == b'byte':
        return b'B'
    elif type_name == b'char':
        return b'C'
    elif type_name == b'short':
        return b'S'
    elif type_name == b'int':
        return b'I'
    elif type_name == b'long':
        return b'J'
    elif type_name == b'float':
        return b'F'
    elif type_name == b'double':
        return b'D'
    elif type_name.startswith(b'['):
        return type_name.replace(b'.', b'/')
    else:
        return b'L%s;' % type_name.replace(b'.', b'/')