public static String getBaseName(String typeName) {
    int idx = typeName.indexOf('(');
    if (idx == -1) {
      return typeName;
    } else {
      return typeName.substring(0, idx);
    }
  }
Get the parameter TypeInfo for a method.

@param size
         In case the last parameter of Method is an array, we will try to
         return a List&lt;TypeInfo&gt; with the specified size by repeating the
         element of the array at the end. In case the size is smaller than
         the minimum possible number of arguments for the method, null will
         be returned.
serde/src/java/org/apache/hadoop/hive/serde2/typeinfo/TypeInfoUtils.java