File: libhamcrest-java-05-backward-compatibility.patch

package info (click to toggle)
jtreg7 7.5.1%2B1%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 51,224 kB
  • sloc: java: 409,123; xml: 8,266; sh: 1,966; ansic: 1,084; exp: 689; makefile: 387; javascript: 162; cpp: 120
file content (23 lines) | stat: -rw-r--r-- 686 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Description: Restores the compatibility with Hamcrest 1.x
Author: Emmanuel Bourg <ebourg@apache.org>
Forwarded: not-needed
--- /dev/null
+++ b/libhamcrest-java/hamcrest/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 {
+}