public Property createCopy(EntityType targetModel) {
        if (!declaringType.getParameters().isEmpty()) {
            Type newType = TypeResolver.resolve(type, declaringType, targetModel);
            if (!newType.equals(type) || !newType.getClass().equals(type.getClass())) {
                return new Property(targetModel, name, newType, inits, false);
            } else {
                return new Property(targetModel, name, type, inits, targetModel.getSuperType() != null);
            }
        } else {
            return new Property(targetModel, name, type, inits, targetModel.getSuperType() != null);
        }
    }
{@code Property} represents a property in a query domain type.

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