W3cubDocs

/Angular 12

ReflectiveKey

class deprecated final

A unique object used for retrieving items from the ReflectiveInjector.

See more...

Deprecated: No replacement

class ReflectiveKey {
  static numberOfKeys: number
  static get(token: Object): ReflectiveKey
  constructor(token: Object, id: number)
  displayName: string
  token: Object
  id: number
}

Description

Keys have:

  • a system-wide unique id.
  • a token.

Key is used internally by ReflectiveInjector because its system-wide unique id allows the injector to store created objects in a more efficient way.

Key should not be created directly. ReflectiveInjector creates keys automatically when resolving providers.

Static properties

Property Description
static numberOfKeys: number Read-Only

Static methods

Retrieves a Key for a token.

static get(token: Object): ReflectiveKey

Parameters
token Object
Returns

ReflectiveKey

Constructor

Private

This class is "final" and should not be extended. See the public API notes.

constructor(token: Object, id: number)

Parameters
token Object
id number

Properties

Property Description
displayName: string Read-Only
token: Object Declared in Constructor
id: number Declared in Constructor

© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v12.angular.io/api/core/ReflectiveKey