public function getAttributes()
    {

        // query whether or not, the requested EAV attributes are available
        if (isset($this->attributes[$entityTypeCode = $this->getEntityTypeCode()])) {
            // load the attributes for the entity type code
            $attributes = $this->attributes[$entityTypeCode];

            // query whether or not an attribute set has been loaded from the source file
            if (is_array($this->attributeSet) && isset($this->attributeSet[MemberNames::ATTRIBUTE_SET_NAME])) {
                // load the attribute set name
                $attributeSetName = $this->attributeSet[MemberNames::ATTRIBUTE_SET_NAME];

                // query whether or not attributes for the actual attribute set name
                if ($attributeSetName && isset($attributes[$attributeSetName])) {
                    return $attributes[$attributeSetName];
                }

                // throw an exception, if not
                throw new \Exception(
                    $this->appendExceptionSuffix(
                        sprintf('Found invalid attribute set name "%s"', $attributeSetName)
                    )
                );
            } else {
                return call_user_func_array('array_merge', $attributes);
            }
        }

        // throw an exception, if not
        throw new \Exception(
            $this->appendExceptionSuffix(
                sprintf('Found invalid entity type code "%s"', $entityTypeCode)
            )
        );
    }