コード例 #1
0
ファイル: TypeResolver.java プロジェクト: AsherBond/voltdb
 static TypeResolver accordingTo(Type type) {
   return new TypeResolver().where(TypeMappingIntrospector.getTypeMappings(type));
 }
コード例 #2
0
ファイル: TypeResolver.java プロジェクト: AsherBond/voltdb
 /**
  * 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);
 }