diff --git a/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php b/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
index 373a779..71863c8 100644
--- a/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
+++ b/core/lib/Drupal/Component/ProxyBuilder/ProxyBuilder.php
@@ -22,7 +22,30 @@ class ProxyBuilder {
    *   The class name of the proxy.
    */
   public static function buildProxyClassName($class_name) {
-    return str_replace('\\', '_', $class_name) . '_Proxy';
+    $match = [];
+    preg_match('/([a-zA-Z0-9]+\\\\[a-zA-Z0-9]+)\\\\(.+)/', $class_name, $match);
+    $root_namespace = $match[1];
+    $rest_fqcn = $match[2];
+    $proxy_class_name = $root_namespace . '\\ProxyClass\\' . $rest_fqcn;
+
+    return $proxy_class_name;
+  }
+
+  /**
+   * Generates the used proxy namespace from a given class name.
+   *
+   * @param string $class_name
+   *   The class name of the actual service.
+   *
+   * @return string
+   *   The namespace name of the proxy.
+   */
+  public static function buildProxyNamespace($class_name) {
+    $proxy_classname = static::buildProxyClassName($class_name);
+
+    preg_match('/(.+)\\\\[a-zA-Z0-9]+/', $proxy_classname, $match);
+    $proxy_namespace = $match[1];
+    return $proxy_namespace;
   }
 
   /**
@@ -34,19 +57,32 @@ public static function buildProxyClassName($class_name) {
    * @return string
    *   The full string with namespace class and methods.
    */
-  public function build($class_name) {
+  public function build($class_name, $proxy_class_name = '') {
     $reflection = new \ReflectionClass($class_name);
 
+    if ($proxy_class_name) {
+      $proxy_class_reflection = new \ReflectionClass($proxy_class_name);
+      $proxy_namespace = $proxy_class_reflection->getNamespaceName();
+    }
+    else {
+      $proxy_class_name = $this->buildProxyClassName($class_name);
+      $proxy_namespace = $this->buildProxyNamespace($class_name);
+      $proxy_class_shortname = str_replace($proxy_namespace . '\\', '', $proxy_class_name);
+    }
+
     $output = '';
     $class_documentation = <<<'EOS'
-/**
- * Provides a proxy class for \{{ class_name }}.
- *
- * @see \Drupal\Component\ProxyBuilder
- */
+
+namespace {{ namespace }}{
+
+    /**
+     * Provides a proxy class for \{{ class_name }}.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
 
 EOS;
-    $class_start = 'class {{ proxy_class_name }}';
+    $class_start = '    class {{ proxy_class_shortname }}';
 
     // For cases in which the implemented interface is a child of another
     // interface, getInterfaceNames() also returns the parent. This causes a
@@ -123,13 +159,14 @@ public function build($class_name) {
       if ($value === '') {
         return $value;
       }
-      return "    $value";
+      return "        $value";
     }, explode("\n", $output)));
 
-    $final_output = $class_documentation . $class_start . "\n{\n\n" . $output . "\n}\n";
+    $final_output = $class_documentation . $class_start . "\n    {\n\n" . $output . "\n    }\n\n}\n";
 
     $final_output = str_replace('{{ class_name }}', $class_name, $final_output);
-    $final_output = str_replace('{{ proxy_class_name }}', $this->buildProxyClassName($class_name), $final_output);
+    $final_output = str_replace('{{ namespace }}', $proxy_namespace ? $proxy_namespace . ' ' : '', $final_output);
+    $final_output = str_replace('{{ proxy_class_shortname }}', $proxy_class_shortname, $final_output);
 
     return $final_output;
   }
@@ -144,8 +181,7 @@ protected function buildLazyLoadItselfMethod() {
 protected function lazyLoadItself()
 {
     if (!isset($this->service)) {
-        $method_name = 'get' . Container::camelize($this->serviceId) . 'Service';
-        $this->service = $this->container->$method_name(false);
+        $this->service = $this->container->get($this->serviceId);
     }
 
     return $this->service;
diff --git a/core/lib/Drupal/Component/ProxyBuilder/ProxyDumper.php b/core/lib/Drupal/Component/ProxyBuilder/ProxyDumper.php
deleted file mode 100644
index 7126062..0000000
--- a/core/lib/Drupal/Component/ProxyBuilder/ProxyDumper.php
+++ /dev/null
@@ -1,78 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Component\ProxyBuilder\ProxyDumper.
- */
-
-namespace Drupal\Component\ProxyBuilder;
-
-use Symfony\Component\DependencyInjection\Definition;
-use Symfony\Component\DependencyInjection\LazyProxy\PhpDumper\DumperInterface;
-
-/**
- * Dumps the proxy service into the dumped PHP container file.
- */
-class ProxyDumper implements DumperInterface {
-
-  /**
-   * Keeps track of already existing proxy classes.
-   *
-   * @var array
-   */
-  protected $buildClasses = [];
-
-  /**
-   * The proxy builder.
-   *
-   * @var \Drupal\Component\ProxyBuilder\ProxyBuilder
-   */
-  protected $builder;
-
-  public function __construct(ProxyBuilder $builder) {
-    $this->builder = $builder;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function isProxyCandidate(Definition $definition) {
-    return $definition->isLazy() && ($class = $definition->getClass()) && class_exists($class);
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getProxyFactoryCode(Definition $definition, $id) {
-    // Note: the specific get method is called initially with $lazyLoad=TRUE;
-    // When you want to retrieve the actual service, the code generated in
-    // ProxyBuilder calls the method with lazy loading disabled.
-    $output = <<<'EOS'
-        if ($lazyLoad) {
-            return $this->services['{{ id }}'] = new {{ class_name }}($this, '{{ id }}');
-        }
-
-EOS;
-    $output = str_replace('{{ id }}', $id, $output);
-    $output = str_replace('{{ class_name }}', $this->builder->buildProxyClassName($definition->getClass()), $output);
-
-    return $output;
-  }
-
-  /**
-   * {@inheritdoc}
-   */
-  public function getProxyCode(Definition $definition) {
-    // Maybe the same class is used in different services, which are both marked
-    // as lazy (just think about 2 database connections).
-    // In those cases we should not generate proxy code the second time.
-    if (!isset($this->buildClasses[$definition->getClass()])) {
-      $this->buildClasses[$definition->getClass()] = TRUE;
-      return $this->builder->build($definition->getClass());
-    }
-    else {
-      return '';
-    }
-  }
-
-}
diff --git a/core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php b/core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php
new file mode 100644
index 0000000..c453eb4
--- /dev/null
+++ b/core/lib/Drupal/Core/Command/GenerateProxyClassApplication.php
@@ -0,0 +1,80 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Command\GenerateProxyClassApplication.
+ */
+
+namespace Drupal\Core\Command;
+
+use Drupal\Component\ProxyBuilder\ProxyBuilder;
+use Drupal\Core\File\FileSystemInterface;
+use Symfony\Component\Console\Application;
+use Symfony\Component\Console\Input\InputInterface;
+
+/**
+ * Provides a console command to generate proxy classes.
+ */
+class GenerateProxyClassApplication extends Application {
+
+  /**
+   * The proxy builder.
+   *
+   * @var \Drupal\Component\ProxyBuilder\ProxyBuilder
+   */
+  protected $proxyBuilder;
+
+  /**
+   * The file system.
+   *
+   * @var \Drupal\Core\File\FileSystemInterface
+   */
+  protected $fileSystem;
+
+  /**
+   * Constructs a new GenerateProxyClassApplication instance.
+   *
+   * @param \Drupal\Component\ProxyBuilder\ProxyBuilder $proxy_builder
+   *   The proxy builder.
+   * @param \Drupal\Core\File\FileSystemInterface $file_system
+   *   The file system.
+   */
+  public function __construct(ProxyBuilder $proxy_builder, FileSystemInterface $file_system) {
+    $this->proxyBuilder = $proxy_builder;
+    $this->fileSystem = $file_system;
+
+    parent::__construct();
+  }
+
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getCommandName(InputInterface $input) {
+    return 'generate-proxy-class';
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function getDefaultCommands() {
+    // Even though this is a single command, keep the HelpCommand (--help).
+    $default_commands = parent::getDefaultCommands();
+    $default_commands[] = new GenerateProxyClassCommand($this->proxyBuilder, $this->fileSystem);
+    return $default_commands;
+  }
+
+  /**
+   * {@inheritdoc}
+   *
+   * Overridden so the application doesn't expect the command name as the first
+   * argument.
+   */
+  public function getDefinition() {
+    $definition = parent::getDefinition();
+    // Clears the normal first argument (the command name).
+    $definition->setArguments();
+    return $definition;
+  }
+
+}
diff --git a/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php b/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php
new file mode 100644
index 0000000..90b39c8
--- /dev/null
+++ b/core/lib/Drupal/Core/Command/GenerateProxyClassCommand.php
@@ -0,0 +1,105 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\Command\GenerateProxyClassCommand.
+ */
+
+namespace Drupal\Core\Command;
+
+use Drupal\Component\ProxyBuilder\ProxyBuilder;
+use Drupal\Core\File\FileSystemInterface;
+use Symfony\Component\Console\Command\Command;
+use Symfony\Component\Console\Input\InputArgument;
+use Symfony\Component\Console\Input\InputInterface;
+use Symfony\Component\Console\Output\OutputInterface;
+
+/**
+ * Provides a console command to generate proxy classes.
+ */
+class GenerateProxyClassCommand extends Command {
+
+  /**
+   * The proxy builder.
+   *
+   * @var \Drupal\Component\ProxyBuilder\ProxyBuilder
+   */
+  protected $proxyBuilder;
+
+  /**
+   * The file system.
+   *
+   * @var \Drupal\Core\File\FileSystemInterface
+   */
+  protected $fileSystem;
+
+  /**
+   * Constructs a new GenerateProxyClassCommand instance.
+   *
+   * @param \Drupal\Component\ProxyBuilder\ProxyBuilder $proxy_builder
+   *   The proxy builder.
+   * @param \Drupal\Core\File\FileSystemInterface $file_system
+   *   The file system.
+   */
+  public function __construct(ProxyBuilder $proxy_builder, FileSystemInterface $file_system) {
+    parent::__construct();
+
+    $this->proxyBuilder = $proxy_builder;
+    $this->fileSystem = $file_system;
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function configure() {
+    $this->setName('generate-proxy-class')
+      ->setDefinition([
+        new InputArgument('class_name', InputArgument::REQUIRED, 'The class to be proxied'),
+        new InputArgument('namespace_root', InputArgument::REQUIRED, 'The filepath to the root of the namespace.'),
+      ])
+      ->setDescription('Dumps a generated proxy class into its appropriate namespace.');
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  protected function execute(InputInterface $input, OutputInterface $output) {
+    $class_name = $input->getArgument('class_name');
+    $namespace_root = $input->getArgument('namespace_root');
+
+    $match = [];
+    preg_match('/([a-zA-Z0-9]+\\\\[a-zA-Z0-9]+)\\\\(.+)/', $class_name, $match);
+
+    if ($match) {
+      $root_namespace = $match[1];
+      $rest_fqcn = $match[2];
+
+      $proxy_filename = $namespace_root . '/ProxyClass/' . str_replace('\\', '/', $rest_fqcn) . '.php';
+      $proxy_class_name = $root_namespace . '\\ProxyClass\\' . $rest_fqcn;
+
+      $proxy_class_string = $this->proxyBuilder->build($class_name);
+
+      $file_string = <<<'EOS'
+<?php
+
+/**
+ * @file
+ * Contains {{ proxy_class_name }}.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+{{ proxy_class_string }}
+EOS;
+      $file_string = str_replace(['{{ proxy_class_name }}', '{{ proxy_class_string }}'], [$proxy_class_name, $proxy_class_string], $file_string);
+
+      $this->fileSystem->mkdir(dirname($proxy_filename), NULL, TRUE);
+      file_put_contents($proxy_filename, $file_string);
+
+      $output->writeln(sprintf('Proxy of class %s written to %s', $class_name, $proxy_filename));
+    }
+
+  }
+
+}
diff --git a/core/lib/Drupal/Core/CoreServiceProvider.php b/core/lib/Drupal/Core/CoreServiceProvider.php
index 64a9aee..216fa5a 100644
--- a/core/lib/Drupal/Core/CoreServiceProvider.php
+++ b/core/lib/Drupal/Core/CoreServiceProvider.php
@@ -10,6 +10,7 @@
 use Drupal\Core\Cache\Context\CacheContextsPass;
 use Drupal\Core\Cache\ListCacheBinsPass;
 use Drupal\Core\DependencyInjection\Compiler\BackendCompilerPass;
+use Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass;
 use Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteEnhancers;
 use Drupal\Core\DependencyInjection\Compiler\RegisterLazyRouteFilters;
 use Drupal\Core\DependencyInjection\Compiler\DependencySerializationTraitPass;
@@ -60,6 +61,8 @@ public function register(ContainerBuilder $container) {
     // list-building passes are operating on the post-alter services list.
     $container->addCompilerPass(new ModifyServiceDefinitionsPass());
 
+    $container->addCompilerPass(new ProxyServicesPass());
+
     $container->addCompilerPass(new BackendCompilerPass());
 
     $container->addCompilerPass(new StackedKernelPass());
diff --git a/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php b/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php
new file mode 100644
index 0000000..494e8db
--- /dev/null
+++ b/core/lib/Drupal/Core/DependencyInjection/Compiler/ProxyServicesPass.php
@@ -0,0 +1,43 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Core\DependencyInjection\Compiler\ProxyServicesPass.
+ */
+
+namespace Drupal\Core\DependencyInjection\Compiler;
+
+use Drupal\Component\ProxyBuilder\ProxyBuilder;
+use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
+use Symfony\Component\DependencyInjection\ContainerBuilder;
+use Symfony\Component\DependencyInjection\Definition;
+
+/**
+ * Replaces all services with a lazy flag.
+ */
+class ProxyServicesPass implements CompilerPassInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function process(ContainerBuilder $container) {
+    foreach ($container->getDefinitions() as $service_id => $definition) {
+      if ($definition->isLazy()) {
+        // Copy the existing definition to a new entry.
+        $definition->setLazy(FALSE);
+        // Ensure that the service is accessible.
+        $definition->setPublic(TRUE);
+        $new_service_id = 'drupal.proxy_service.' . $service_id;
+        $container->setDefinition($new_service_id, $definition);
+
+        $proxy_class = ProxyBuilder::buildProxyClassName($definition->getClass());
+        if (class_exists($proxy_class)) {
+          $proxy_definition = new Definition($proxy_class);
+          $proxy_definition->setArguments(['service_container', $new_service_id]);
+
+        }
+      }
+    }
+  }
+
+}
diff --git a/core/lib/Drupal/Core/DrupalKernel.php b/core/lib/Drupal/Core/DrupalKernel.php
index b8eeb4f..bda91c5 100644
--- a/core/lib/Drupal/Core/DrupalKernel.php
+++ b/core/lib/Drupal/Core/DrupalKernel.php
@@ -8,7 +8,6 @@
 namespace Drupal\Core;
 
 use Drupal\Component\FileCache\FileCacheFactory;
-use Drupal\Component\ProxyBuilder\ProxyDumper;
 use Drupal\Component\Utility\Crypt;
 use Drupal\Component\Utility\Unicode;
 use Drupal\Component\Utility\UrlHelper;
@@ -1180,7 +1179,6 @@ protected function dumpDrupalContainer(ContainerBuilder $container, $baseClass)
     }
     // Cache the container.
     $dumper = new PhpDumper($container);
-    $dumper->setProxyDumper(new ProxyDumper(new ProxyBuilder()));
     $class = $this->getClassName();
     $namespace = $this->getClassNamespace();
     $content = $dumper->dump([
diff --git a/core/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php b/core/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php
new file mode 100644
index 0000000..9f2dd9e
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Batch/BatchStorage.php
@@ -0,0 +1,83 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Batch\BatchStorage.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Batch {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Batch\BatchStorage.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class BatchStorage implements \Drupal\Core\Batch\BatchStorageInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Batch\BatchStorage
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function load($id)
+        {
+            return $this->lazyLoadItself()->load($id);
+        }
+
+        public function delete($id)
+        {
+            return $this->lazyLoadItself()->delete($id);
+        }
+
+        public function update(array $batch)
+        {
+            return $this->lazyLoadItself()->update($batch);
+        }
+
+        public function cleanup()
+        {
+            return $this->lazyLoadItself()->cleanup();
+        }
+
+        public function create(array $batch)
+        {
+            return $this->lazyLoadItself()->create($batch);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php b/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php
new file mode 100644
index 0000000..f5d0899
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Config/ConfigInstaller.php
@@ -0,0 +1,99 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Config\ConfigInstaller.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Config {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Config\ConfigInstaller.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ConfigInstaller implements \Drupal\Core\Config\ConfigInstallerInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Config\ConfigInstaller
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function installDefaultConfig($type, $name)
+        {
+            return $this->lazyLoadItself()->installDefaultConfig($type, $name);
+        }
+
+        public function installOptionalConfig(\Drupal\Core\Config\StorageInterface $storage = NULL, $dependency = array (
+        ))
+        {
+            return $this->lazyLoadItself()->installOptionalConfig($storage, $dependency);
+        }
+
+        public function installCollectionDefaultConfig($collection)
+        {
+            return $this->lazyLoadItself()->installCollectionDefaultConfig($collection);
+        }
+
+        public function setSourceStorage(\Drupal\Core\Config\StorageInterface $storage)
+        {
+            return $this->lazyLoadItself()->setSourceStorage($storage);
+        }
+
+        public function getSourceStorage()
+        {
+            return $this->lazyLoadItself()->getSourceStorage();
+        }
+
+        public function setSyncing($status)
+        {
+            return $this->lazyLoadItself()->setSyncing($status);
+        }
+
+        public function isSyncing()
+        {
+            return $this->lazyLoadItself()->isSyncing();
+        }
+
+        public function checkConfigurationToInstall($type, $name)
+        {
+            return $this->lazyLoadItself()->checkConfigurationToInstall($type, $name);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Cron.php b/core/lib/Drupal/Core/ProxyClass/Cron.php
new file mode 100644
index 0000000..57f484d
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Cron.php
@@ -0,0 +1,63 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Cron.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Cron.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class Cron implements \Drupal\Core\CronInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Cron
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function run()
+        {
+            return $this->lazyLoadItself()->run();
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Entity/ContentUninstallValidator.php b/core/lib/Drupal/Core/ProxyClass/Entity/ContentUninstallValidator.php
new file mode 100644
index 0000000..2fdc139
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Entity/ContentUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Entity\ContentUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Entity {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Entity\ContentUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ContentUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Entity\ContentUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php b/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
new file mode 100644
index 0000000..2e2791a
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Extension\ModuleInstaller.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Extension {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Extension\ModuleInstaller.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ModuleInstaller implements \Drupal\Core\Extension\ModuleInstallerInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Extension\ModuleInstaller
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function addUninstallValidator(\Drupal\Core\Extension\ModuleUninstallValidatorInterface $uninstall_validator)
+        {
+            return $this->lazyLoadItself()->addUninstallValidator($uninstall_validator);
+        }
+
+        public function install(array $module_list, $enable_dependencies = true)
+        {
+            return $this->lazyLoadItself()->install($module_list, $enable_dependencies);
+        }
+
+        public function uninstall(array $module_list, $uninstall_dependents = true)
+        {
+            return $this->lazyLoadItself()->uninstall($module_list, $uninstall_dependents);
+        }
+
+        public function validateUninstall(array $module_list)
+        {
+            return $this->lazyLoadItself()->validateUninstall($module_list);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php b/core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php
new file mode 100644
index 0000000..4bf88f5
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Extension/RequiredModuleUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Extension\RequiredModuleUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Extension {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Extension\RequiredModuleUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class RequiredModuleUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Extension\RequiredModuleUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Field/FieldModuleUninstallValidator.php b/core/lib/Drupal/Core/ProxyClass/Field/FieldModuleUninstallValidator.php
new file mode 100644
index 0000000..8a0b949
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Field/FieldModuleUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Field\FieldModuleUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Field {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Field\FieldModuleUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class FieldModuleUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Field\FieldModuleUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module_name)
+        {
+            return $this->lazyLoadItself()->validate($module_name);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php b/core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
new file mode 100644
index 0000000..d250001
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/File/MimeType/ExtensionMimeTypeGuesser.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\File\MimeType\ExtensionMimeTypeGuesser.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\File\MimeType {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ExtensionMimeTypeGuesser implements \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\File\MimeType\ExtensionMimeTypeGuesser
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function guess($path)
+        {
+            return $this->lazyLoadItself()->guess($path);
+        }
+
+        public function setMapping(array $mapping = NULL)
+        {
+            return $this->lazyLoadItself()->setMapping($mapping);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/File/MimeType/MimeTypeGuesser.php b/core/lib/Drupal/Core/ProxyClass/File/MimeType/MimeTypeGuesser.php
new file mode 100644
index 0000000..ef2320d
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/File/MimeType/MimeTypeGuesser.php
@@ -0,0 +1,73 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\File\MimeType\MimeTypeGuesser.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\File\MimeType {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\File\MimeType\MimeTypeGuesser.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class MimeTypeGuesser implements \Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\File\MimeType\MimeTypeGuesser
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function guess($path)
+        {
+            return $this->lazyLoadItself()->guess($path);
+        }
+
+        public function addGuesser(\Symfony\Component\HttpFoundation\File\MimeType\MimeTypeGuesserInterface $guesser, $priority = 0)
+        {
+            return $this->lazyLoadItself()->addGuesser($guesser, $priority);
+        }
+
+        public static function registerWithSymfonyGuesser(\Symfony\Component\DependencyInjection\ContainerInterface $container)
+        {
+            \Drupal\Core\File\MimeType\MimeTypeGuesser::registerWithSymfonyGuesser($container);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php b/core/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php
new file mode 100644
index 0000000..0a1644b
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Lock\DatabaseLockBackend.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Lock {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Lock\DatabaseLockBackend.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class DatabaseLockBackend implements \Drupal\Core\Lock\LockBackendInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Lock\DatabaseLockBackend
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function acquire($name, $timeout = 30)
+        {
+            return $this->lazyLoadItself()->acquire($name, $timeout);
+        }
+
+        public function lockMayBeAvailable($name)
+        {
+            return $this->lazyLoadItself()->lockMayBeAvailable($name);
+        }
+
+        public function release($name)
+        {
+            return $this->lazyLoadItself()->release($name);
+        }
+
+        public function releaseAll($lock_id = NULL)
+        {
+            return $this->lazyLoadItself()->releaseAll($lock_id);
+        }
+
+        public function wait($name, $delay = 30)
+        {
+            return $this->lazyLoadItself()->wait($name, $delay);
+        }
+
+        public function getLockId()
+        {
+            return $this->lazyLoadItself()->getLockId();
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php b/core/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php
new file mode 100644
index 0000000..5b4dc36
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Lock/PersistentDatabaseLockBackend.php
@@ -0,0 +1,88 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Lock\PersistentDatabaseLockBackend.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Lock {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Lock\PersistentDatabaseLockBackend.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class PersistentDatabaseLockBackend implements \Drupal\Core\Lock\LockBackendInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Lock\PersistentDatabaseLockBackend
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function acquire($name, $timeout = 30)
+        {
+            return $this->lazyLoadItself()->acquire($name, $timeout);
+        }
+
+        public function lockMayBeAvailable($name)
+        {
+            return $this->lazyLoadItself()->lockMayBeAvailable($name);
+        }
+
+        public function release($name)
+        {
+            return $this->lazyLoadItself()->release($name);
+        }
+
+        public function releaseAll($lock_id = NULL)
+        {
+            return $this->lazyLoadItself()->releaseAll($lock_id);
+        }
+
+        public function wait($name, $delay = 30)
+        {
+            return $this->lazyLoadItself()->wait($name, $delay);
+        }
+
+        public function getLockId()
+        {
+            return $this->lazyLoadItself()->getLockId();
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/PageCache/ChainResponsePolicy.php b/core/lib/Drupal/Core/ProxyClass/PageCache/ChainResponsePolicy.php
new file mode 100644
index 0000000..13b391e
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/PageCache/ChainResponsePolicy.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\PageCache\ChainResponsePolicy.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\PageCache {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\PageCache\ChainResponsePolicy.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ChainResponsePolicy implements \Drupal\Core\PageCache\ChainResponsePolicyInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\PageCache\ChainResponsePolicy
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function check(\Symfony\Component\HttpFoundation\Response $response, \Symfony\Component\HttpFoundation\Request $request)
+        {
+            return $this->lazyLoadItself()->check($response, $request);
+        }
+
+        public function addPolicy(\Drupal\Core\PageCache\ResponsePolicyInterface $policy)
+        {
+            return $this->lazyLoadItself()->addPolicy($policy);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/ParamConverter/AdminPathConfigEntityConverter.php b/core/lib/Drupal/Core/ProxyClass/ParamConverter/AdminPathConfigEntityConverter.php
new file mode 100644
index 0000000..a6516ee
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/ParamConverter/AdminPathConfigEntityConverter.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\ParamConverter\AdminPathConfigEntityConverter.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\ParamConverter {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class AdminPathConfigEntityConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\ParamConverter\AdminPathConfigEntityConverter
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function convert($value, $definition, $name, array $defaults)
+        {
+            return $this->lazyLoadItself()->convert($value, $definition, $name, $defaults);
+        }
+
+        public function applies($definition, $name, \Symfony\Component\Routing\Route $route)
+        {
+            return $this->lazyLoadItself()->applies($definition, $name, $route);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/ParamConverter/MenuLinkPluginConverter.php b/core/lib/Drupal/Core/ProxyClass/ParamConverter/MenuLinkPluginConverter.php
new file mode 100644
index 0000000..ea0e7dd
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/ParamConverter/MenuLinkPluginConverter.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\ParamConverter\MenuLinkPluginConverter.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\ParamConverter {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\ParamConverter\MenuLinkPluginConverter.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class MenuLinkPluginConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\ParamConverter\MenuLinkPluginConverter
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function convert($value, $definition, $name, array $defaults)
+        {
+            return $this->lazyLoadItself()->convert($value, $definition, $name, $defaults);
+        }
+
+        public function applies($definition, $name, \Symfony\Component\Routing\Route $route)
+        {
+            return $this->lazyLoadItself()->applies($definition, $name, $route);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php b/core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
new file mode 100644
index 0000000..4e9cba4
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Plugin/CachedDiscoveryClearer.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Plugin\CachedDiscoveryClearer.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Plugin {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Plugin\CachedDiscoveryClearer.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class CachedDiscoveryClearer
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Plugin\CachedDiscoveryClearer
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function addCachedDiscovery(\Drupal\Component\Plugin\Discovery\CachedDiscoveryInterface $cached_discovery)
+        {
+            return $this->lazyLoadItself()->addCachedDiscovery($cached_discovery);
+        }
+
+        public function clearCachedDefinitions()
+        {
+            return $this->lazyLoadItself()->clearCachedDefinitions();
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Render/BareHtmlPageRenderer.php b/core/lib/Drupal/Core/ProxyClass/Render/BareHtmlPageRenderer.php
new file mode 100644
index 0000000..53277c7
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Render/BareHtmlPageRenderer.php
@@ -0,0 +1,64 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Render\BareHtmlPageRenderer.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Render {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Render\BareHtmlPageRenderer.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class BareHtmlPageRenderer implements \Drupal\Core\Render\BareHtmlPageRendererInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Render\BareHtmlPageRenderer
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function renderBarePage(array $content, $title, $page_theme_property, array $page_additions = array (
+        ))
+        {
+            return $this->lazyLoadItself()->renderBarePage($content, $title, $page_theme_property, $page_additions);
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php b/core/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php
new file mode 100644
index 0000000..a7aea17
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Routing/MatcherDumper.php
@@ -0,0 +1,74 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Routing\MatcherDumper.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Routing {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Routing\MatcherDumper.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class MatcherDumper implements \Drupal\Core\Routing\MatcherDumperInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Routing\MatcherDumper
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function addRoutes(\Symfony\Component\Routing\RouteCollection $routes)
+        {
+            return $this->lazyLoadItself()->addRoutes($routes);
+        }
+
+        public function dump(array $options = array (
+        ))
+        {
+            return $this->lazyLoadItself()->dump($options);
+        }
+
+        public function getRoutes()
+        {
+            return $this->lazyLoadItself()->getRoutes();
+        }
+
+    }
+
+}
diff --git a/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php b/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php
new file mode 100644
index 0000000..092d8ad
--- /dev/null
+++ b/core/lib/Drupal/Core/ProxyClass/Routing/RouteBuilder.php
@@ -0,0 +1,78 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\Core\ProxyClass\Routing\RouteBuilder.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\Core\ProxyClass\Routing {
+
+    /**
+     * Provides a proxy class for \Drupal\Core\Routing\RouteBuilder.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class RouteBuilder implements \Drupal\Core\Routing\RouteBuilderInterface, \Drupal\Core\DestructableInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\Core\Routing\RouteBuilder
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function setRebuildNeeded()
+        {
+            return $this->lazyLoadItself()->setRebuildNeeded();
+        }
+
+        public function rebuild()
+        {
+            return $this->lazyLoadItself()->rebuild();
+        }
+
+        public function rebuildIfNeeded()
+        {
+            return $this->lazyLoadItself()->rebuildIfNeeded();
+        }
+
+        public function destruct()
+        {
+            return $this->lazyLoadItself()->destruct();
+        }
+
+    }
+
+}
diff --git a/core/modules/book/src/ProxyClass/BookUninstallValidator.php b/core/modules/book/src/ProxyClass/BookUninstallValidator.php
new file mode 100644
index 0000000..85ed47b
--- /dev/null
+++ b/core/modules/book/src/ProxyClass/BookUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\book\ProxyClass\BookUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\book\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\book\BookUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class BookUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\book\BookUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/modules/field/src/ProxyClass/FieldUninstallValidator.php b/core/modules/field/src/ProxyClass/FieldUninstallValidator.php
new file mode 100644
index 0000000..75e24e1
--- /dev/null
+++ b/core/modules/field/src/ProxyClass/FieldUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\field\ProxyClass\FieldUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\field\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\field\FieldUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class FieldUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\field\FieldUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/modules/filter/src/ProxyClass/FilterUninstallValidator.php b/core/modules/filter/src/ProxyClass/FilterUninstallValidator.php
new file mode 100644
index 0000000..92b8d9e
--- /dev/null
+++ b/core/modules/filter/src/ProxyClass/FilterUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\filter\ProxyClass\FilterUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\filter\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\filter\FilterUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class FilterUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\filter\FilterUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/modules/forum/src/ProxyClass/ForumUninstallValidator.php b/core/modules/forum/src/ProxyClass/ForumUninstallValidator.php
new file mode 100644
index 0000000..4cee29a
--- /dev/null
+++ b/core/modules/forum/src/ProxyClass/ForumUninstallValidator.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\forum\ProxyClass\ForumUninstallValidator.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\forum\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\forum\ForumUninstallValidator.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ForumUninstallValidator implements \Drupal\Core\Extension\ModuleUninstallValidatorInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\forum\ForumUninstallValidator
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function validate($module)
+        {
+            return $this->lazyLoadItself()->validate($module);
+        }
+
+        public function setStringTranslation(\Drupal\Core\StringTranslation\TranslationInterface $translation)
+        {
+            return $this->lazyLoadItself()->setStringTranslation($translation);
+        }
+
+    }
+
+}
diff --git a/core/modules/language/src/ProxyClass/LanguageConverter.php b/core/modules/language/src/ProxyClass/LanguageConverter.php
new file mode 100644
index 0000000..4b501cd
--- /dev/null
+++ b/core/modules/language/src/ProxyClass/LanguageConverter.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\language\ProxyClass\LanguageConverter.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\language\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\language\LanguageConverter.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class LanguageConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\language\LanguageConverter
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function convert($value, $definition, $name, array $defaults)
+        {
+            return $this->lazyLoadItself()->convert($value, $definition, $name, $defaults);
+        }
+
+        public function applies($definition, $name, \Symfony\Component\Routing\Route $route)
+        {
+            return $this->lazyLoadItself()->applies($definition, $name, $route);
+        }
+
+    }
+
+}
diff --git a/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php b/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php
new file mode 100644
index 0000000..49b6018
--- /dev/null
+++ b/core/modules/node/src/ProxyClass/ParamConverter/NodePreviewConverter.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\node\ProxyClass\ParamConverter\NodePreviewConverter.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace Drupal\node\ProxyClass\ParamConverter {
+
+    /**
+     * Provides a proxy class for \Drupal\node\ParamConverter\NodePreviewConverter.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class NodePreviewConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\node\ParamConverter\NodePreviewConverter
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function convert($value, $definition, $name, array $defaults)
+        {
+            return $this->lazyLoadItself()->convert($value, $definition, $name, $defaults);
+        }
+
+        public function applies($definition, $name, \Symfony\Component\Routing\Route $route)
+        {
+            return $this->lazyLoadItself()->applies($definition, $name, $route);
+        }
+
+    }
+
+}
diff --git a/core/modules/views_ui/src/ProxyClass/ViewUIConverter.php b/core/modules/views_ui/src/ProxyClass/ViewUIConverter.php
new file mode 100644
index 0000000..8e525cb
--- /dev/null
+++ b/core/modules/views_ui/src/ProxyClass/ViewUIConverter.php
@@ -0,0 +1,68 @@
+<?php
+
+/**
+ * @file
+ * Contains ui\ParamConverter\ProxyClass\ViewUIConverter.
+ */
+
+/**
+ * This file is generated via core/scripts/generate-proxy-class.php.
+ */
+
+namespace ui\ParamConverter\ProxyClass {
+
+    /**
+     * Provides a proxy class for \Drupal\views_ui\ParamConverter\ViewUIConverter.
+     *
+     * @see \Drupal\Component\ProxyBuilder
+     */
+    class ViewUIConverter implements \Drupal\Core\ParamConverter\ParamConverterInterface
+    {
+
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \Drupal\views_ui\ParamConverter\ViewUIConverter
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
+        }
+
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
+
+        public function convert($value, $definition, $name, array $defaults)
+        {
+            return $this->lazyLoadItself()->convert($value, $definition, $name, $defaults);
+        }
+
+        public function applies($definition, $name, \Symfony\Component\Routing\Route $route)
+        {
+            return $this->lazyLoadItself()->applies($definition, $name, $route);
+        }
+
+    }
+
+}
diff --git a/core/scripts/generate-proxy-class.php b/core/scripts/generate-proxy-class.php
new file mode 100644
index 0000000..764f092
--- /dev/null
+++ b/core/scripts/generate-proxy-class.php
@@ -0,0 +1,23 @@
+#!/usr/bin/env php
+<?php
+
+use Drupal\Core\Command\GenerateProxyClassApplication;
+use Drupal\Core\DrupalKernel;
+use Drupal\Core\ProxyBuilder\ProxyBuilder;
+use Drupal\Core\Site\Settings;
+use Symfony\Component\HttpFoundation\Request;
+
+if (PHP_SAPI !== 'cli') {
+  return;
+}
+
+// Bootstrap.
+$autoloader = require __DIR__ . '/../../autoload.php';
+require_once __DIR__ . '/../includes/bootstrap.inc';
+$request = Request::createFromGlobals();
+Settings::initialize(dirname(dirname(__DIR__)), DrupalKernel::findSitePath($request), $autoloader);
+$kernel = DrupalKernel::createFromRequest($request, $autoloader, 'prod')->boot();
+
+// Run the database dump command.
+$application = new GenerateProxyClassApplication(new ProxyBuilder(), \Drupal::service('file_system'));
+$application->run();
diff --git a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php b/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
index a0f57fe..d04227e 100644
--- a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
+++ b/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyBuilderTest.php
@@ -37,7 +37,15 @@ protected function setUp() {
    */
   public function testBuildProxyClassName() {
     $class_name = $this->proxyBuilder->buildProxyClassName('Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod');
-    $this->assertEquals('Drupal_Tests_Component_ProxyBuilder_TestServiceNoMethod_Proxy', $class_name);
+    $this->assertEquals('Drupal\Tests\ProxyClass\Component\ProxyBuilder\TestServiceNoMethod', $class_name);
+  }
+
+  /**
+   * @covers ::buildProxyNamespace
+   */
+  public function testBuildProxyNamespace() {
+    $class_name = $this->proxyBuilder->buildProxyNamespace('Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod');
+    $this->assertEquals('Drupal\Tests\ProxyClass\Component\ProxyBuilder', $class_name);
   }
 
   /**
@@ -65,10 +73,10 @@ public function testBuildSimpleMethod() {
 
     $method_body = <<<'EOS'
 
-    public function method()
-    {
-        return $this->lazyLoadItself()->method();
-    }
+public function method()
+{
+    return $this->lazyLoadItself()->method();
+}
 
 EOS;
     $this->assertEquals($this->buildExpectedClass($class, $method_body), $result);
@@ -86,10 +94,10 @@ public function testBuildMethodWithParameter() {
 
     $method_body = <<<'EOS'
 
-    public function methodWithParameter($parameter)
-    {
-        return $this->lazyLoadItself()->methodWithParameter($parameter);
-    }
+public function methodWithParameter($parameter)
+{
+    return $this->lazyLoadItself()->methodWithParameter($parameter);
+}
 
 EOS;
     $this->assertEquals($this->buildExpectedClass($class, $method_body), $result);
@@ -108,11 +116,11 @@ public function testBuildComplexMethod() {
     // @todo Solve the silly linebreak for array()
     $method_body = <<<'EOS'
 
-    public function complexMethod($parameter, callable $function, \Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (
-    ))
-    {
-        return $this->lazyLoadItself()->complexMethod($parameter, $function, $test_service, $elements);
-    }
+public function complexMethod($parameter, callable $function, \Drupal\Tests\Component\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (
+))
+{
+    return $this->lazyLoadItself()->complexMethod($parameter, $function, $test_service, $elements);
+}
 
 EOS;
 
@@ -131,10 +139,10 @@ public function testBuildReturnReference() {
     // @todo Solve the silly linebreak for array()
     $method_body = <<<'EOS'
 
-    public function &returnReference()
-    {
-        return $this->lazyLoadItself()->returnReference();
-    }
+public function &returnReference()
+{
+    return $this->lazyLoadItself()->returnReference();
+}
 
 EOS;
 
@@ -153,10 +161,10 @@ public function testBuildWithInterface() {
 
     $method_body = <<<'EOS'
 
-    public function testMethod($parameter)
-    {
-        return $this->lazyLoadItself()->testMethod($parameter);
-    }
+public function testMethod($parameter)
+{
+    return $this->lazyLoadItself()->testMethod($parameter);
+}
 
 EOS;
 
@@ -189,10 +197,10 @@ public function testBuildWithProtectedAndPrivateMethod() {
 
     $method_body = <<<'EOS'
 
-    public function testMethod($parameter)
-    {
-        return $this->lazyLoadItself()->testMethod($parameter);
-    }
+public function testMethod($parameter)
+{
+    return $this->lazyLoadItself()->testMethod($parameter);
+}
 
 EOS;
 
@@ -212,10 +220,10 @@ public function testBuildWithPublicStaticMethod() {
     // Ensure that the static method is not wrapped.
     $method_body = <<<'EOS'
 
-    public static function testMethod($parameter)
-    {
-        \Drupal\Tests\Component\ProxyBuilder\TestServiceWithPublicStaticMethod::testMethod($parameter);
-    }
+public static function testMethod($parameter)
+{
+    \Drupal\Tests\Component\ProxyBuilder\TestServiceWithPublicStaticMethod::testMethod($parameter);
+}
 
 EOS;
 
@@ -232,53 +240,69 @@ public static function testMethod($parameter)
    *   The code of the entire proxy.
    */
   protected function buildExpectedClass($class, $expected_methods_body, $interface_string = '') {
-    $proxy_class = $this->proxyBuilder->buildProxyClassName($class);
+    $namespace = ProxyBuilder::buildProxyNamespace($class);
+    $reflection = new \ReflectionClass($class);
+    $proxy_class = $reflection->getShortName();
+
     $expected_string = <<<'EOS'
-/**
- * Provides a proxy class for \{{ class }}.
- *
- * @see \Drupal\Component\ProxyBuilder
- */
-class {{ proxy_class }}{{ interface_string }}
-{
 
-    /**
-     * @var string
-     */
-    protected $serviceId;
+namespace {{ namespace }} {
 
     /**
-     * @var \{{ class }}
-     */
-    protected $service;
-
-    /**
-     * The service container.
+     * Provides a proxy class for \{{ class }}.
      *
-     * @var \Symfony\Component\DependencyInjection\ContainerInterface
+     * @see \Drupal\Component\ProxyBuilder
      */
-    protected $container;
-
-    public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+    class {{ proxy_class }}{{ interface_string }}
     {
-        $this->container = $container;
-        $this->serviceId = $serviceId;
-    }
 
-    protected function lazyLoadItself()
-    {
-        if (!isset($this->service)) {
-            $method_name = 'get' . Container::camelize($this->serviceId) . 'Service';
-            $this->service = $this->container->$method_name(false);
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \{{ class }}
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
         }
 
-        return $this->service;
-    }
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
 {{ expected_methods_body }}
+    }
+
 }
 
 EOS;
+
+    $expected_methods_body = implode("\n", array_map(function ($value) {
+      if ($value === '') {
+        return $value;
+      }
+      return "        $value";
+    }, explode("\n", $expected_methods_body)));
+
     $expected_string = str_replace('{{ proxy_class }}', $proxy_class, $expected_string);
+    $expected_string = str_replace('{{ namespace }}', $namespace, $expected_string);
     $expected_string = str_replace('{{ class }}', $class, $expected_string);
     $expected_string = str_replace('{{ expected_methods_body }}', $expected_methods_body, $expected_string);
     $expected_string = str_replace('{{ interface_string }}', $interface_string, $expected_string);
diff --git a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyDumperTest.php b/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyDumperTest.php
deleted file mode 100644
index 8285306..0000000
--- a/core/tests/Drupal/Tests/Component/ProxyBuilder/ProxyDumperTest.php
+++ /dev/null
@@ -1,129 +0,0 @@
-<?php
-
-/**
- * @file
- * Contains \Drupal\Tests\Component\ProxyBuilder\ProxyDumperTest.
- */
-
-namespace Drupal\Tests\Component\ProxyBuilder;
-
-use Drupal\Component\ProxyBuilder\ProxyDumper;
-use Drupal\Tests\UnitTestCase;
-use Symfony\Component\DependencyInjection\Definition;
-
-/**
- * @coversDefaultClass \Drupal\Component\ProxyBuilder\ProxyDumper
- * @group proxy_builder
- */
-class ProxyDumperTest extends UnitTestCase {
-
-  /**
-   * The mocked proxy builder.
-   *
-   * @var \Drupal\Component\ProxyBuilder\ProxyBuilder|\PHPUnit_Framework_MockObject_MockObject
-   */
-  protected $proxyBuilder;
-
-  /**
-   * The tested proxy dumper.
-   *
-   * @var \Drupal\Component\ProxyBuilder\ProxyDumper
-   */
-  protected $proxyDumper;
-
-  /**
-   * {@inheritdoc}
-   */
-  protected function setUp() {
-    parent::setUp();
-
-    $this->proxyBuilder = $this->getMockBuilder('Drupal\Component\ProxyBuilder\ProxyBuilder')
-      ->disableOriginalConstructor()
-      ->setMethods(['build'])
-      ->getMock();
-    $this->proxyDumper = new ProxyDumper($this->proxyBuilder);
-  }
-
-  /**
-   * @dataProvider providerTestIsProxyCandidate
-   * @covers ::isProxyCandidate
-   */
-  public function testIsProxyCandidate(Definition $definition, $expected) {
-    $this->assertSame($expected, $this->proxyDumper->isProxyCandidate($definition));
-  }
-
-  public function providerTestIsProxyCandidate() {
-    // Not lazy service.
-    $data = [];
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestService');
-    $data[] = [$definition, FALSE];
-    // Not existing service.
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestNotExistingService');
-    $definition->setLazy(TRUE);
-    $data[] = [$definition, FALSE];
-    // Existing and lazy service.
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestService');
-    $definition->setLazy(TRUE);
-    $data[] = [$definition, TRUE];
-
-    return $data;
-  }
-
-  public function testGetProxyFactoryCode() {
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestService');
-    $definition->setLazy(TRUE);
-
-    $result = $this->proxyDumper->getProxyFactoryCode($definition, 'test_service');
-
-    $expected = <<<'EOS'
-        if ($lazyLoad) {
-            return $this->services['test_service'] = new Drupal_Tests_Component_ProxyBuilder_TestService_Proxy($this, 'test_service');
-        }
-
-EOS;
-
-    $this->assertEquals($expected, $result);
-  }
-
-  /**
-   * @covers ::getProxyCode
-   */
-  public function testGetProxyCode() {
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestService');
-    $definition->setLazy(TRUE);
-
-    $class = 'class Drupal_Tests_Component_ProxyBuilder_TestService_Proxy {}';
-    $this->proxyBuilder->expects($this->once())
-      ->method('build')
-      ->with('Drupal\Tests\Component\ProxyBuilder\TestService')
-      ->willReturn($class);
-
-    $result = $this->proxyDumper->getProxyCode($definition);
-    $this->assertEquals($class, $result);
-  }
-
-  /**
-   * @covers ::getProxyCode
-   */
-  public function testGetProxyCodeWithSameClassMultipleTimes() {
-    $definition = new Definition('Drupal\Tests\Component\ProxyBuilder\TestService');
-    $definition->setLazy(TRUE);
-
-    $class = 'class Drupal_Tests_Component_ProxyBuilder_TestService_Proxy {}';
-    $this->proxyBuilder->expects($this->once())
-      ->method('build')
-      ->with('Drupal\Tests\Component\ProxyBuilder\TestService')
-      ->willReturn($class);
-
-    $result = $this->proxyDumper->getProxyCode($definition);
-    $this->assertEquals($class, $result);
-
-    $result = $this->proxyDumper->getProxyCode($definition);
-    $this->assertEquals('', $result);
-  }
-
-}
-
-class TestService {
-
-}
diff --git a/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php b/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
index f04b75a..b8458f9 100644
--- a/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
+++ b/core/tests/Drupal/Tests/Core/ProxyBuilder/ProxyBuilderTest.php
@@ -44,11 +44,11 @@ public function testBuildComplexMethod() {
     // @todo Solve the silly linebreak for array()
     $method_body = <<<'EOS'
 
-    public function complexMethod($parameter, callable $function, \Drupal\Tests\Core\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (
-    ))
-    {
-        return $this->lazyLoadItself()->complexMethod($parameter, $function, $test_service, $elements);
-    }
+public function complexMethod($parameter, callable $function, \Drupal\Tests\Core\ProxyBuilder\TestServiceNoMethod $test_service = NULL, array &$elements = array (
+))
+{
+    return $this->lazyLoadItself()->complexMethod($parameter, $function, $test_service, $elements);
+}
 
 EOS;
 
@@ -65,55 +65,70 @@ public function complexMethod($parameter, callable $function, \Drupal\Tests\Core
    *   The code of the entire proxy.
    */
   protected function buildExpectedClass($class, $expected_methods_body, $interface_string = '') {
-    $proxy_class = $this->proxyBuilder->buildProxyClassName($class);
+    $reflection = new \ReflectionClass($class);
+    $namespace = ProxyBuilder::buildProxyNamespace($class);
+    $proxy_class = $reflection->getShortName();
     $expected_string = <<<'EOS'
-/**
- * Provides a proxy class for \{{ class }}.
- *
- * @see \Drupal\Component\ProxyBuilder
- */
-class {{ proxy_class }}{{ interface_string }}
-{
-
-    use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
 
-    /**
-     * @var string
-     */
-    protected $serviceId;
+namespace {{ namespace }} {
 
     /**
-     * @var \{{ class }}
-     */
-    protected $service;
-
-    /**
-     * The service container.
+     * Provides a proxy class for \{{ class }}.
      *
-     * @var \Symfony\Component\DependencyInjection\ContainerInterface
+     * @see \Drupal\Component\ProxyBuilder
      */
-    protected $container;
-
-    public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+    class {{ proxy_class }}{{ interface_string }}
     {
-        $this->container = $container;
-        $this->serviceId = $serviceId;
-    }
 
-    protected function lazyLoadItself()
-    {
-        if (!isset($this->service)) {
-            $method_name = 'get' . Container::camelize($this->serviceId) . 'Service';
-            $this->service = $this->container->$method_name(false);
+        use \Drupal\Core\DependencyInjection\DependencySerializationTrait;
+
+        /**
+         * @var string
+         */
+        protected $serviceId;
+
+        /**
+         * @var \{{ class }}
+         */
+        protected $service;
+
+        /**
+         * The service container.
+         *
+         * @var \Symfony\Component\DependencyInjection\ContainerInterface
+         */
+        protected $container;
+
+        public function __construct(\Symfony\Component\DependencyInjection\ContainerInterface $container, $serviceId)
+        {
+            $this->container = $container;
+            $this->serviceId = $serviceId;
         }
 
-        return $this->service;
-    }
+        protected function lazyLoadItself()
+        {
+            if (!isset($this->service)) {
+                $this->service = $this->container->get($this->serviceId);
+            }
+
+            return $this->service;
+        }
 {{ expected_methods_body }}
+    }
+
 }
 
 EOS;
+
+    $expected_methods_body = implode("\n", array_map(function ($value) {
+      if ($value === '') {
+        return $value;
+      }
+      return "        $value";
+    }, explode("\n", $expected_methods_body)));
+
     $expected_string = str_replace('{{ proxy_class }}', $proxy_class, $expected_string);
+    $expected_string = str_replace('{{ namespace }}', $namespace, $expected_string);
     $expected_string = str_replace('{{ class }}', $class, $expected_string);
     $expected_string = str_replace('{{ expected_methods_body }}', $expected_methods_body, $expected_string);
     $expected_string = str_replace('{{ interface_string }}', $interface_string, $expected_string);
