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

Method boundsAsInterfaces

output/java_guava/1.4.19/TypeToken.java:352–362  ·  view source on GitHub ↗
(Type[] bounds)

Source from the content-addressed store, hash-verified

350
351
352 private ImmutableList<TypeToken<? super T>> boundsAsInterfaces(Type[] bounds) {
353 ImmutableList.Builder<TypeToken<? super T>> builder = ImmutableList.builder();
354 for (Type bound : bounds) {
355 @SuppressWarnings("unchecked") // upper bound of T
356 TypeToken<? super T> boundType = (TypeToken<? super T>) of(bound);
357 if (boundType.getRawType().isInterface()) {
358 builder.add(boundType);
359 }
360 }
361 return builder.build();
362 }
363
364 /**
365 * Returns the set of interfaces and classes that this type is or is a subtype of. The returned

Callers 1

getGenericInterfacesMethod · 0.95

Calls 5

builderMethod · 0.95
ofMethod · 0.95
addMethod · 0.65
getRawTypeMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected