protected function createAttributeByMethod(AttributeAnnotation $annotation, \ReflectionMethod $method): Attribute
    {
        $name = ($annotation->name === null)
            ? $this->resolveNameByMethod($method)
            : $annotation->name;

        $attribute = new Attribute($name, $method->getName());

        if ($annotation->setter !== null) {
            $attribute->setSetter($annotation->setter);
        }

        if ($annotation->type !== null) {
            $this->processDataType($annotation->type, $attribute);
        }

        return $attribute;
    }