aboutsummaryrefslogtreecommitdiff
path: root/hamcrest-core/src/main/java/org/hamcrest/Factory.java
diff options
context:
space:
mode:
Diffstat (limited to 'hamcrest-core/src/main/java/org/hamcrest/Factory.java')
-rw-r--r--hamcrest-core/src/main/java/org/hamcrest/Factory.java17
1 files changed, 17 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..a8bf5f9
--- /dev/null
+++ b/hamcrest-core/src/main/java/org/hamcrest/Factory.java
@@ -0,0 +1,17 @@
+package org.hamcrest;
+
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+
+/**
+ * Marks a Hamcrest static factory method so tools recognise them.
+ * A factory method is an equivalent to a named constructor.
+ *
+ * @author Joe Walnes
+ */
+@Retention(RUNTIME)
+@Target({METHOD})
+public @interface Factory {
+}