Produces a String representation of a Key in a deterministic fashion. The result is a combination of the key's Key#type() type and an optional Key#qualifier() qualifier.
(Key key)
| 40 | * Key#qualifier() qualifier}. |
| 41 | */ |
| 42 | static String formatKey(Key key) { |
| 43 | StringBuilder builder = new StringBuilder(); |
| 44 | if (key.qualifier().isPresent()) { |
| 45 | formatAnnotation(key.qualifier().get(), builder); |
| 46 | builder.append(' '); |
| 47 | } |
| 48 | return builder.append(key.type().toString()).toString(); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Produces a string version of {@code annotation} with its attributes and values, including any |