protected function createClass($newName, array $proxyMethods, \ReflectionClass $class)
    {
        $src = $this->proxyTemplate;
        $src = str_replace('NEW_NAME', $newName, $src);
        $src = str_replace('CLASS_NAME', $class->getName(), $src);
        $methods = array();
        foreach ($proxyMethods as $method) {
            if ($class->hasMethod($method)) {
                $methods[] = $this->createMethod($class->getMethod($method));
            }
        }
        $src = str_replace('METHODS', implode("\n", $methods), $src);
        return $src;
    }