MCPcopy Create free account
hub / github.com/antlr/codebuff / boundAsSuperclass

Method boundAsSuperclass

output/java_guava/1.4.18/TypeToken.java:312–321  ·  view source on GitHub ↗
(Type bound)

Source from the content-addressed store, hash-verified

310 }
311
312 @Nullable
313 private TypeToken<? super T> boundAsSuperclass(Type bound) {
314 TypeToken<?> token = of(bound);
315 if (token.getRawType().isInterface()) {
316 return null;
317 }
318 @SuppressWarnings("unchecked") // only upper bound of T is passed in.
319 TypeToken<? super T> superclass = (TypeToken<? super T>) token;
320 return superclass;
321 }
322
323 /**
324 * Returns the generic interfaces that this type directly {@code implements}. This method is

Callers 1

getGenericSuperclassMethod · 0.95

Calls 2

ofMethod · 0.95
getRawTypeMethod · 0.45

Tested by

no test coverage detected