public static String getTypeCategory(String type) {
   int endIndex = type.indexOf('<');
   String t = endIndex > 0 ? type.substring(0, endIndex) : type;
   if (CodecModel.CUSTOM_CODEC_MAP.containsKey(t)) {
     return "CUSTOM";
   } else if (t.equals("java.util.Map")) {
     return "MAP";
   } else if (t.equals("java.util.List")
       || t.equals("java.util.Set")
       || t.equals("java.util.Collection")) {
     return "COLLECTION";
   } else if (type.endsWith("[]")) {
     return "ARRAY";
   }
   return "OTHER";
 }
 public static String getTypeCodec(String type) {
   int endIndex = type.indexOf('<');
   String t = endIndex > 0 ? type.substring(0, endIndex) : type;
   TypeElement typeElement = CodecModel.CUSTOM_CODEC_MAP.get(t);
   return typeElement != null ? typeElement.toString() : "";
 }