MCPcopy Index your code
hub / github.com/google/dagger / formatKey

Method formatKey

java/dagger/internal/codegen/KytheFormatting.java:42–49  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 2

keyNodeMethod · 0.45
visitWildcardMethod · 0.45

Calls 6

formatAnnotationMethod · 0.95
appendMethod · 0.80
getMethod · 0.65
qualifierMethod · 0.45
toStringMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected