code: private static Type[] extractTypeArgumentsFrom(final Map<TypeVariable<?>, Type> mappings, final TypeVariable<?>[] variables) {
          final Type[] result = new Type[variables.length];
          int index = 0;
          for (final TypeVariable<?> var : variables) {
              Validate.isTrue(mappings.containsKey(var), "missing argument mapping for %s", toString(var));
              result[index++] = mappings.get(var);
          }
          return result;
      }
docs: Helper method to establish the formal parameters for a parameterized type.
  @param mappings map containing the assignments
  @param variables expected map keys
  @return array of map values corresponding to specified keys