integration-cdi/src/main/java/org/ocpsoft/rewrite/cdi/CdiServiceLocator.java
private Type getRequiredType(Class<?> clazz)
   {

      TypeVariable<?>[] typeParameters = clazz.getTypeParameters();

      if (typeParameters.length > 0) {

         Type[] actualTypeParameters = new Type[typeParameters.length];
         for (int i = 0; i < typeParameters.length; i++) {
            actualTypeParameters[i] = new WildcardTypeImpl(new Type[] { Object.class }, new Type[] {});
         }

         return new ParameterizedTypeImpl(clazz, actualTypeParameters, null);

      }

      return clazz;
   }
private Type getRequiredType(Class<?> clazz)
   {

      TypeVariable<?>[] typeParameters = clazz.getTypeParameters();

      if (typeParameters.length > 0) {

         Type[] actualTypeParameters = new Type[typeParameters.length];
         for (int i = 0; i < typeParameters.length; i++) {
            actualTypeParameters[i] = new WildcardTypeImpl(new Type[] { Object.class }, new Type[] {});
         }

         return new ParameterizedTypeImpl(clazz, actualTypeParameters, null);

      }

      return clazz;
   }
Builds the correct "required type" including actual type arguments in case of parameterized types.

@see https://github.com/ocpsoft/rewrite/issues/137