(String formatId, boolean needRegistration)
| 92 | } |
| 93 | |
| 94 | @ApiStatus.Internal @NotNull @SneakyThrows |
| 95 | public static ClipboardFormat _registerFormatInternal(String formatId, boolean needRegistration) { |
| 96 | ClipboardFormat format = _formats.get(formatId); |
| 97 | |
| 98 | if (format != null) |
| 99 | return format; |
| 100 | if (needRegistration && !_nRegisterFormat(formatId)) |
| 101 | throw new RuntimeException("Failed to register format: " + formatId); |
| 102 | |
| 103 | return _cacheFormatEntry(formatId); |
| 104 | } |
| 105 | |
| 106 | @ApiStatus.Internal @NotNull |
| 107 | public static ClipboardFormat _cacheFormatEntry(String formatId) { |
no test coverage detected