aboutsummaryrefslogtreecommitdiff
path: root/hamcrest-core
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2017-01-23 14:35:30 +0000
committerPaul Duffin <paulduffin@google.com>2017-02-09 15:12:38 +0000
commit6f4e8908ed0d9f5a292c6acd82fa492252c2a4e3 (patch)
treeeb81b842397a1c1df39dd2e3d7418fceb1c68d5a /hamcrest-core
parente3f85a659ab92bd0b2366fd826b8eca28adffc77 (diff)
downloadhamcrest-6f4e8908ed0d9f5a292c6acd82fa492252c2a4e3.tar.gz
Replace org.hamcrest.Factory for backwards compatibility
Bug: 30946317 Test: make checkbuild Change-Id: I47a2c30f820a35ceabdcdb3f972b36fd843f7d76
Diffstat (limited to 'hamcrest-core')
-rw-r--r--hamcrest-core/src/main/java/org/hamcrest/Factory.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/hamcrest-core/src/main/java/org/hamcrest/Factory.java b/hamcrest-core/src/main/java/org/hamcrest/Factory.java
new file mode 100644
index 0000000..99a5132
--- /dev/null
+++ b/hamcrest-core/src/main/java/org/hamcrest/Factory.java
@@ -0,0 +1,20 @@
+package org.hamcrest;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * Marks a Hamcrest static factory method so tools recognise them.
+ * A factory method is an equivalent to a named constructor.
+ *
+ * @deprecated The code generator is no longer maintained. Write classes of syntactic sugar by hand.
+ * @author Joe Walnes
+ */
+@Retention(RUNTIME)
+@Target({METHOD})
+@Deprecated
+public @interface Factory {
+}