diff --git a/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php b/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php
index 940c0e1..c937890 100644
--- a/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php
+++ b/core/lib/Drupal/Core/Render/MetadataBubblingUrlGenerator.php
@@ -96,8 +96,14 @@ protected function bubble(GeneratedUrl $generated_url, array $options = []) {
   /**
    * {@inheritdoc}
    */
-  public function generate($name, $parameters = array(), $absolute = FALSE) {
-    $options['absolute'] = $absolute;
+  public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) {
+    if (is_bool($referenceType)) {
+      trigger_error('The use of a boolean as a $referenceType argument of the '.__CLASS__.'::generate method is deprecated since version 8.1.x and will not be supported anymore in 9.0.x. Use the constants defined in the UrlGeneratorInterface instead. See issue #2674780', E_USER_DEPRECATED);
+      $options['absolute'] = $referenceType;
+    }
+    else {
+      $options['absolute'] = $referenceType === self::ABSOLUTE_URL;
+    }
     $generated_url = $this->generateFromRoute($name, $parameters, $options, TRUE);
     $this->bubble($generated_url);
     return $generated_url->getGeneratedUrl();
diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php
index 29af788..3f2ebd8 100644
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -272,8 +272,14 @@ protected function getInternalPathFromRoute($name, SymfonyRoute $route, $paramet
   /**
    * {@inheritdoc}
    */
-  public function generate($name, $parameters = array(), $absolute = FALSE) {
-    $options['absolute'] = $absolute;
+  public function generate($name, $parameters = array(), $referenceType = self::ABSOLUTE_PATH) {
+    if (is_bool($referenceType)) {
+      trigger_error('The use of a boolean as a $referenceType argument of the '.__CLASS__.'::generate method is deprecated since version 8.1.x and will not be supported anymore in 9.0.x. Use the constants defined in the UrlGeneratorInterface instead. See issue #2674780', E_USER_DEPRECATED);
+      $options['absolute'] = $referenceType;
+    }
+    else {
+      $options['absolute'] = $referenceType === self::ABSOLUTE_URL;
+    }
     return $this->generateFromRoute($name, $parameters, $options);
   }
 
diff --git a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
index b7ec0bc..47738a8 100644
--- a/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
+++ b/core/tests/Drupal/Tests/Core/Routing/UrlGeneratorTest.php
@@ -217,6 +217,27 @@ public function testAliasGeneration() {
   }
 
   /**
+   * Confirms that generated routes will have aliased paths using interface constants.
+   */
+  public function testAliasGenerationUsingInterfaceConstants() {
+    $url = $this->generator->generate('test_1', array(), UrlGenerator::ABSOLUTE_PATH);
+    $this->assertEquals('/hello/world', $url);
+    // No cacheability to test; UrlGenerator::generate() doesn't support
+    // collecting cacheability metadata.
+
+    $this->routeProcessorManager->expects($this->exactly(3))
+      ->method('processOutbound')
+      ->with($this->anything());
+
+
+    // Check that the two generate methods return the same result.
+    $this->assertGenerateFromRoute('test_1', [], [], $url, (new BubbleableMetadata())->setCacheMaxAge(Cache::PERMANENT));
+
+    $path = $this->generator->getPathFromRoute('test_1');
+    $this->assertEquals('test/one', $path);
+  }
+
+  /**
    * @covers ::generateFromRoute
    */
   public function testUrlGenerationWithDisabledPathProcessing() {
@@ -376,6 +397,24 @@ public function testAbsoluteURLGeneration() {
   }
 
   /**
+   * Confirms that absolute URLs work with generated routes using interface constants.
+   */
+  public function testAbsoluteURLGenerationUsingInterfaceConstants() {
+    $url = $this->generator->generate('test_1', array(), UrlGenerator::ABSOLUTE_URL);
+    $this->assertEquals('http://localhost/hello/world', $url);
+    // No cacheability to test; UrlGenerator::generate() doesn't support
+    // collecting cacheability metadata.
+
+    $this->routeProcessorManager->expects($this->exactly(2))
+      ->method('processOutbound')
+      ->with($this->anything());
+
+    $options = array('absolute' => TRUE, 'fragment' => 'top');
+    // Extra parameters should appear in the query string.
+    $this->assertGenerateFromRoute('test_1', ['zoo' => 5], $options, 'http://localhost/hello/world?zoo=5#top', (new BubbleableMetadata())->setCacheMaxAge(Cache::PERMANENT)->setCacheContexts(['url.site']));
+  }
+
+  /**
    * Confirms that explicitly setting the base_url works with generated routes
    */
   public function testBaseURLGeneration() {
