code: private static void doShallowCopy(Object source, Object target, final Boolean allProperties,
              final String... propertyNames) {
  
          Assert.notNull(source, "source");
          Assert.notNull(target, "target");
          Assert.notNull(allProperties, "allProperties");
          Assert.notNull(propertyNames, "propertyNames");
  
          final PropertyAccessor sourceAccessor = PropertyAccessorFactory.forDirectFieldAccess(source);
          final PropertyAccessor targetAccessor = PropertyAccessorFactory.forDirectFieldAccess(target);
  
          // Try to copy every property
          ReflectionUtils.doWithFields(source.getClass(), new ReflectionUtils.FieldCallback() {
  
              /**
               * {@inheritDoc}
               */
              @Override
              public void doWith(Field field) { // throws IllegalArgumentException, IllegalAccessException {
  
                  final String fieldName = field.getName();
  
                  Boolean proceed = !Modifier.isFinal(field.getModifiers());
                  proceed &= (targetAccessor.isWritableProperty(fieldName));
                  proceed &= (allProperties | Arrays.asList(propertyNames).contains(fieldName));
  
                  if (proceed) {
  
                      final Object value = sourceAccessor.getPropertyValue(fieldName);
                      targetAccessor.setPropertyValue(fieldName, value);
                  }
              }
          });
      }
docs: Makes a shallow copy of the source object into the target one excluding properties not in
  <code>propertyNames</code> unless <code>allProperties</code> is true.
  <p>
  This method differs from {@link ReflectionUtils#shallowCopyFieldState(Object, Object)} this doesn't require
  source and target objects to share the same class hierarchy.
  
  @param source
  the source object.
  @param target
  the target object.
  @param allProperties
  if <code>true</code> then <code>propertyNames</code> will be ignored and all properties processed.
  @param propertyNames
  the property names to be processed. Never mind if property names are invalid, in such a case are
  ignored.