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

Method getRequestKind

java/dagger/internal/codegen/RequestKinds.java:98–109  ·  view source on GitHub ↗

Returns the RequestKind that matches the wrapping types (if any) of type.

(TypeMirror type)

Source from the content-addressed store, hash-verified

96
97 /** Returns the {@link RequestKind} that matches the wrapping types (if any) of {@code type}. */
98 static RequestKind getRequestKind(TypeMirror type) {
99 checkTypePresent(type);
100 for (RequestKind kind : RequestKind.values()) {
101 if (matchesKind(kind, type)) {
102 if (kind.equals(PROVIDER) && matchesKind(LAZY, extractKeyType(kind, type))) {
103 return PROVIDER_OF_LAZY;
104 }
105 return kind;
106 }
107 }
108 return INSTANCE;
109 }
110
111 /**
112 * Returns {@code true} if {@code type} is a parameterized type of {@code kind}'s {@link

Callers 5

unwrapOptionalMethod · 0.80
newDependencyRequestMethod · 0.80

Calls 5

matchesKindMethod · 0.95
extractKeyTypeMethod · 0.95
valuesMethod · 0.65
checkTypePresentMethod · 0.45
equalsMethod · 0.45

Tested by

no test coverage detected