code: public static ClassNode pickGenericType(MethodNode node, int parameterIndex, int gtIndex) {
          final Parameter[] parameters = node.getParameters();
          final ClassNode type = parameters[parameterIndex].getOriginType();
          return pickGenericType(type, gtIndex);
      }
docs: A helper method which will extract the n-th generic type from the n-th parameter of a method node.
  @param node the method node from which the generic type should be picked
  @param parameterIndex the index of the parameter in the method parameter list
  @param gtIndex the index of the generic type to extract
  @return the generic type, or {@link org.codehaus.groovy.ast.ClassHelper#OBJECT_TYPE} if it doesn't exist.