private Type asGeneric(Type type) {
        if (type.getParameters().size() == 0) {
            int count = type.getJavaClass().getTypeParameters().length;
            if (count > 0) {
                return new SimpleType(type, new Type[count]);
            }
        }
        return type;
    }
{@code TypeFactory} is a factory class for {@link Type} instances

@author tiwe
querydsl-codegen/src/main/java/com/querydsl/codegen/TypeFactory.java