@Nonnull
	private static String elementValueToString(@Nonnull TextFormatConfig format, @Nonnull Object value) {
		switch (value) {
			case String str -> {
				// String value
				return '"' + EscapeUtil.escapeStandardAndUnicodeWhitespace(str) + '"';
			}
			case Type type -> {
				// Class value
				return format.filter(type.getInternalName()) + ".class";
			}
			case AnnotationInfo subAnnotation -> {
				// Annotation value
				return annotationToString(format, subAnnotation);
			}
			case AnnotationEnumReference enumReference -> {
				// Enum value
				String enumType = Type.getType(enumReference.getDescriptor()).getInternalName();
				return format.filter(enumType) + '.' + enumReference.getValue();
			}
			case List<?> list -> {
				// List of values
				String elements = list.stream()
						.map(e -> elementValueToString(format, e))
						.collect(Collectors.joining(", "));
				return "{ " + elements + " }";
			}
			case boolean[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (boolean b : array)
					str.add(Boolean.toString(b));
				return "{ " + str + " }";
			}
			case byte[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (byte b : array)
					str.add(Byte.toString(b));
				return "{ " + str + " }";
			}
			case char[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (char c : array)
					str.add(Character.toString(c));
				return "{ " + str + " }";
			}
			case short[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (short s : array)
					str.add(Short.toString(s));
				return "{ " + str + " }";
			}
			case int[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (int i : array)
					str.add(Integer.toString(i));
				return "{ " + str + " }";
			}
			case float[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (float f : array)
					str.add(Float.toString(f));
				return "{ " + str + " }";
			}
			case double[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (double d : array)
					str.add(Double.toString(d));
				return "{ " + str + " }";
			}
			case long[] array -> {
				StringJoiner str = new StringJoiner(", ");
				for (long l : array)
					str.add(Long.toString(l));
				return "{ " + str + " }";
			}
			default -> {
				// Primitive
				return value.toString();
			}
		}
	}
@param format
		Format config.
@param value
		Annotation element value to represent.

@return String display of the element value.
recaf-core/src/main/java/software/coley/recaf/services/decompile/fallback/print/PrintUtils.java