protected function hydrateMethod($targetObject, $method, $value)
    {
        if (method_exists($targetObject, $method)) {
            $dryObject = $this->getParameterClassObject($targetObject, $method);

            if ($dryObject && is_object($dryObject)) {
                $hydratedObject = null;

                // does the dry object have a setCollection method?
                //
                if (method_exists($dryObject, 'setCollection') && method_exists($dryObject, 'getValueClass')) {
                    $hydratedObject = $this->hydrateCollection($dryObject, $value);
                }

                if (!$hydratedObject) {
                    $hydratedObject = $this->hydrateObject($dryObject, $value);
                }

                $targetObject->$method($hydratedObject);

                return;
            }

            if ($value && is_object($value)) {
                $value = (array) $value;
            }

            $targetObject->$method($value);
        }
    }