private static String convertParamType(TypeMirror type) {
		if (type.getKind().isPrimitive()) {
			return switch (type.getKind()) {
				case BOOLEAN -> "typing.Union[jpype.JBoolean, bool]";
				case BYTE -> "typing.Union[jpype.JByte, int]";
				case CHAR -> "typing.Union[jpype.JChar, int, str]";
				case DOUBLE -> "typing.Union[jpype.JDouble, float]";
				case FLOAT -> "typing.Union[jpype.JFloat, float]";
				case INT -> "typing.Union[jpype.JInt, int]";
				case LONG -> "typing.Union[jpype.JLong, int]";
				case SHORT -> "typing.Union[jpype.JShort, int]";
				default -> throw new RuntimeException("unexpected TypeKind " + type.getKind());
			};
		}

		if (type instanceof DeclaredType dt) {
			Element element = dt.asElement();
			if (element instanceof QualifiedNameable nameable) {
				return AUTO_CONVERSIONS.get(nameable.getQualifiedName().toString());
			}
		}
		return null;
	}
Converts the provided parameter type to a typing.Union of all the allowed types

@param type the parameter type
@return the converted type
GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubMethod.java