@@ -0,0 +1,615 @@
+import java.lang.reflect.ParameterizedType;%0Aimport java.lang.reflect.Type;%0A%0Apublic class TypeReference%3CT%3E %7B%0A    private final Type genericType;%0A%0A    /*%0A     * Needs to have zero-arg constructor%0A     */%0A    public TypeReference() %7B%0A        Type superClassType = getClass().getGenericSuperclass();%0A        this.genericType = ((ParameterizedType) superClassType).getActualTypeArguments()%5B0%5D;%0A    %7D%0A%0A    /*%0A     * This method needs to return a value such that:%0A     * %0A     * new TypeReference%3CT%3E()%7B%7D.getType() == T.class%0A     * %0A     * See JUnit%0A     */%0A    public Type getType() %7B%0A        return genericType;%0A    %7D%0A%7D%0A

Create TypeReference.java