protected function generateTraitMethods()
    {
        if (empty($this->_traitMethodsAliases)) {
            return;
        }

        $this->addProperty(
            '___classMocker_traitMethods',
            $this->_traitMethodsAliases,
            PropertyGenerator::FLAG_PRIVATE | PropertyGenerator::FLAG_STATIC
        );

        foreach (array_keys($this->_traitMethodsAliases) as $methodName) {

            if (!$this->canGenerateMethod($methodName)) {
                continue;
            }

            if (!$this->isValidTraitMethod($methodName)) {
                throw new \RuntimeException(
                    sprintf(
                        "Trait magic method %s::%s() is not valid, use %s() instead",
                        $this->getName(),
                        $methodName,
                        '_' . $methodName
                    )
                );
            }

            $this->generateMethod($methodName);
        }
    }