boolean isProvider(TypeMirror type) {
    return type.getKind().equals(TypeKind.DECLARED)
        && MoreTypes.asTypeElement(type).equals(provider());
  }
True if {@code type} is a {@code Provider}.
factory/src/main/java/com/google/auto/factory/processor/InjectApi.java