private String getConstantValue(VariableElement field) {
		Object value = field.getConstantValue();
		return switch (value) {
			case String str -> doclet.getStringLiteral(str);
			case Character str -> doclet.getStringLiteral(str);
			case Boolean flag -> flag ? "True" : "False";
			case Float dec -> convertFloatConstant(dec);
			case Double dec -> convertFloatConstant(dec);
			case null -> null;
			default -> value.toString();
		};
	}
Converts the provided field to a Python constant if applicable

@param field the field
@return the constant value or null
GhidraBuild/BuildFiles/Doclets/src/main/java/ghidra/doclets/typestubs/PythonTypeStubType.java