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

Method boundsAsInterfaces

output/java_guava/1.4.18/TypeToken.java:353–363  ·  view source on GitHub ↗
(Type[] bounds)

Source from the content-addressed store, hash-verified

351
352
353 private ImmutableList<TypeToken<? super T>> boundsAsInterfaces(Type[] bounds) {
354 ImmutableList.Builder<TypeToken<? super T>> builder = ImmutableList.builder();
355 for (Type bound : bounds) {
356 @SuppressWarnings("unchecked") // upper bound of T
357 TypeToken<? super T> boundType = (TypeToken<? super T>) of(bound);
358 if (boundType.getRawType().isInterface()) {
359 builder.add(boundType);
360 }
361 }
362 return builder.build();
363 }
364
365 /**
366 * 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