String formatFromTypeMirror(TypeMirror m)

Source

static String formatFromTypeMirror(TypeMirror m) {
  if (m.isSubtypeOf(reflectType(int))) {
    return FormatInt32;
  } else if (m.isSubtypeOf(reflectType(double))) {
    return FormatDouble;
  } else if (m.isSubtypeOf(reflectType(DateTime))) {
    return FormatDateTime;
  }

  return null;
}