public static <T> TypeId<T> get(Class<T> type) {
    if (type.isPrimitive()) {
      // guarded by equals
      @SuppressWarnings("unchecked")
      TypeId<T> result = (TypeId<T>) PRIMITIVE_TO_TYPE.get(type);
      return result;
    }
    String name = type.getName().replace('.', '/');
    return get(type.isArray() ? name : 'L' + name + ';');
  }
@param name a descriptor like "Ljava/lang/Class;".
android/android_framework/dex-maker/src/main/java/com/android/dx/TypeId.java