code: private static Class<?> getMethodType(Map<String, Class<?>> types, 
                                            Type type, Class<?> clazz) {
          
          // check if type is an actual type variable
          TypeVariable<?> variable = getTypeVariable(type);
          if (variable != null) {
              
              // verify type is overridden
              String name = variable.getName();
              if (types.containsKey(name)) {
                  
                  // convert to array if necessary
                  Class<?> actual = types.get(name);
                  int dimensions = getDimensions(type);
                  if (dimensions > 0) {
                      actual = Array.newInstance(actual, dimensions).getClass();
                  }
                  
                  // return overridden type
                  return actual;
              }
          }
          
          // nothing overriden, so just return base class
          return clazz;
      }
docs: Get the actual type for the given type.  If the type is a type variable
  that is specified in the given types, then the associated class is
  returned.  Otherwise, the specified class is returned.
  
  @param types  The set of named type variables
  @param type  The generic type of the method
  @param clazz  The underlying type of the method
  
  @return  The actual type to use in the method