Temporarily add void is(Class) to cause compile time errors

The is(Class) method was removed upstream between Hamcrest 1.1
and 1.3 in favour of the instanceOf(Class) method.
Unfortunately, existing usages of it could still compile against
the is(Object) method instead. Although not every existing usage
would compile successfully it is possible that some could and
that would result in a change in the runtime behavior that could
be difficult to detect and fix. This change aims to turn any
significant usage of this method into a compile time error.

Bug: 30946317
Test: make checkbuild
Change-Id: I48d1c80fb9faae4e4c490f30c9fe0275fd66a58b
diff --git a/hamcrest-core/src/main/java/org/hamcrest/CoreMatchers.java b/hamcrest-core/src/main/java/org/hamcrest/CoreMatchers.java
index ada655a..799a26a 100644
--- a/hamcrest-core/src/main/java/org/hamcrest/CoreMatchers.java
+++ b/hamcrest-core/src/main/java/org/hamcrest/CoreMatchers.java
@@ -115,6 +115,22 @@
   }
 
   /**
+   * Provided to cause compile time error when used in preference to a possible runtime error if
+   * this was not here.
+   *
+   * <p>This method was removed upstream between Hamcrest 1.1 and 1.3 in favour of the
+   * instanceOf(Class) method. Unfortunately, existing usages of it could still compile against the
+   * {@link #is(Object)} method instead. Although not every existing usage would compile
+   * successfully it is possible that some could and that would result in a change in the runtime
+   * behavior that could be difficult to detect and fix. This change aims to turn any significant
+   * usage of this method into a compile time error.
+   *
+   * @deprecated Use instanceOf(SomeClass.class) instead.
+   */
+  public static void is(java.lang.Class<?> type) {
+  }
+
+  /**
    * A shortcut to the frequently used <code>is(instanceOf(SomeClass.class))</code>.
    * For example:
    * <pre>assertThat(cheese, isA(Cheddar.class))</pre>
diff --git a/hamcrest-library/src/main/java/org/hamcrest/Matchers.java b/hamcrest-library/src/main/java/org/hamcrest/Matchers.java
index ca1238d..b04c45d 100644
--- a/hamcrest-library/src/main/java/org/hamcrest/Matchers.java
+++ b/hamcrest-library/src/main/java/org/hamcrest/Matchers.java
@@ -201,6 +201,22 @@
   }
 
   /**
+   * Provided to cause compile time error when used in preference to a possible runtime error if
+   * this was not here.
+   *
+   * <p>This method was removed upstream between Hamcrest 1.1 and 1.3 in favour of the
+   * instanceOf(Class) method. Unfortunately, existing usages of it could still compile against the
+   * {@link #is(Object)} method instead. Although not every existing usage would compile
+   * successfully it is possible that some could and that would result in a change in the runtime
+   * behavior that could be difficult to detect and fix. This change aims to turn any significant
+   * usage of this method into a compile time error.
+   *
+   * @deprecated Use instanceOf(SomeClass.class) instead.
+   */
+  public static void is(java.lang.Class<?> type) {
+  }
+
+  /**
    * A shortcut to the frequently used <code>is(instanceOf(SomeClass.class))</code>.
    * For example:
    * <pre>assertThat(cheese, isA(Cheddar.class))</pre>