ReflectiveKey

A unique object used for retrieving items from the ReflectiveInjector.

弃用说明

No replacement

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

说明

Keys have:

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

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

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

静态属性

属性名类型说明
numberOfKeys只读

静态方法

Retrieves a Key for a token.

static get(token: Object): ReflectiveKey

参数

token

Type: Object.

返回值

ReflectiveKey

构造函数

Private

constructor(token: Object, id: number)

参数

token

Type: Object.

id

Type: number.

属性

属性名类型说明
displayName只读
token声明于构造函数中
id声明于构造函数中