Ejemplo n.º 1
0
 static TypeResolver accordingTo(Type type) {
   return new TypeResolver().where(TypeMappingIntrospector.getTypeMappings(type));
 }
Ejemplo n.º 2
0
 /**
  * Returns type mappings using type parameters and type arguments found in the generic
  * superclass and the super interfaces of {@code contextClass}.
  */
 static ImmutableMap<TypeVariable<?>, Type> getTypeMappings(Type contextType) {
   TypeMappingIntrospector introspector = new TypeMappingIntrospector();
   introspector.visit(wildcardCapturer.capture(contextType));
   return ImmutableMap.copyOf(introspector.mappings);
 }