public function getProperties()
    {
        $properties = new BeanPropertyCollection();

        // Properties already taken into account accross the hierarchy.
        $registeredProperties = array();
        $target = $this->getClass();

        while ($target) {

            foreach ($target->getProperties() as $prop) {

                $propName = $prop->getName();

                if ($this->isPropertyAnnotated($propName) === true && in_array($propName, $registeredProperties) === false) {
                    $properties[] = new BeanProperty($target->getName(), $propName);
                    $registeredProperties[] = $propName;
                }
            }

            $target = $target->getParentClass();
        }

        return $properties;
    }