MCPcopy
hub / github.com/google/gson / matches

Method matches

src/main/java/com/google/gson/reflect/TypeToken.java:274–280  ·  view source on GitHub ↗

Checks if two types are the same or are equivalent under a variable mapping given in the type map that was provided.

(Type from, Type to, Map<String, Type> typeMap)

Source from the content-addressed store, hash-verified

272 * given in the type map that was provided.
273 */
274 @SuppressWarnings("unchecked")
275 private static boolean matches(Type from, Type to, Map<String, Type> typeMap) {
276 return to.equals(from)
277 || (from instanceof TypeVariable
278 && to.equals(typeMap.get(((TypeVariable<?>) from).getName())));
279
280 }
281
282 @Override public final int hashCode() {
283 return this.hashCode;

Callers 1

typeEqualsMethod · 0.95

Calls 3

getNameMethod · 0.80
equalsMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected