summaryrefslogtreecommitdiff
path: root/same
diff options
context:
space:
mode:
authorKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-01 21:26:01 +0100
committerKjetil Ørbekk <kjetil.orbekk@gmail.com>2012-03-01 21:26:01 +0100
commit5a06b9427bbdd776d691ad1736cd147aa3914031 (patch)
tree582ba89622e1e7bf4d81412ac3c381e901bceccf /same
parent3b4fe75085ed84f20bdca75a3a89ea955abb5105 (diff)
Add class for easy access to different TypeReferences.
Diffstat (limited to 'same')
-rw-r--r--same/src/main/java/com/orbekk/same/Types.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/same/src/main/java/com/orbekk/same/Types.java b/same/src/main/java/com/orbekk/same/Types.java
new file mode 100644
index 0000000..3185acf
--- /dev/null
+++ b/same/src/main/java/com/orbekk/same/Types.java
@@ -0,0 +1,13 @@
+package com.orbekk.same;
+
+import org.codehaus.jackson.type.TypeReference;
+
+public class Types {
+ public final static TypeReference<String> STRING =
+ new TypeReference<String>() {};
+ public final static TypeReference<Integer> INTEGER =
+ new TypeReference<Integer>() {};
+ public static <T> TypeReference<T> fromType(Class<T> clazz) {
+ return new TypeReference<T>() {};
+ }
+}