@Override
    public Object clone() throws CloneNotSupportedException {
        BeanMap newMap = (BeanMap) super.clone();

        if (bean == null) {
            // no bean, just an empty bean map at the moment.  return a newly
            // cloned and empty bean map.
            return newMap;
        }

        Object newBean = null;
        Class<?> beanClass = null;
        try {
            beanClass = bean.getClass();
            newBean = beanClass.newInstance();
        } catch (Exception e) {
            // unable to instantiate
            throw new CloneNotSupportedException("Unable to instantiate the underlying bean \"" + beanClass.getName() + "\": " + e);
        }

        try {
            newMap.setBean(newBean);
        } catch (Exception exception) {
            throw new CloneNotSupportedException("Unable to set bean in the cloned bean map: " + exception);
        }

        try {
            // copy only properties that are readable and writable.  If its
            // not readable, we can't get the value from the old map.  If
            // its not writable, we can't write a value into the new map.
            for (String key : readMethods.keySet()) {
                if (getWriteMethod(key) != null) {
                    newMap.put(key, get(key));
                }
            }
        } catch (Exception exception) {
            throw new CloneNotSupportedException("Unable to copy bean values to cloned bean map: " + exception);
        }

        return newMap;
    }
Clone this bean map using the following process:
<p>
<ul>
<li>If there is no underlying bean, return a cloned BeanMap without a
bean.
<p>
<li>Since there is an underlying bean, try to instantiate a new bean of
the same type using Class.newInstance().
<p>
<li>If the instantiation fails, throw a CloneNotSupportedException
<p>
<li>Clone the bean map and set the newly instantiated bean as the
underlying bean for the bean map.
<p>
<li>Copy each property that is both readable and writable from the
existing object to a cloned bean map.
<p>
<li>If anything fails along the way, throw a
CloneNotSupportedException.
<p>
</ul>
querydsl-core/src/main/java/com/querydsl/core/util/BeanMap.java