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 == "void":
        return "V"
    elif type_name == "boolean":
        return "Z"
    elif type_name == "char":
        return "C"
    elif type_name == "byte":
        return "B"
    elif type_name == "short":
        return "S"
    elif type_name == "int":
        return "I"
    elif type_name == "long":
        return "J"
    elif type_name == "float":
        return "F"
    elif type_name == "double":
        return "D"
    elif type_name.startswith("["):
        return type_name.replace('.', '/')
    else:
        return "L{};".format(type_name.replace('.', '/'))