Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

Hierarchy

Index

Constructors

constructor

Properties

Private Readonly instanceMembers

instanceMembers: Map<string | symbol, MethodMirror<any, any> | PropertyMirror<any>> = ...

Instance members 实例成员集合

Readonly metadata

metadata: Set<T> = ...

metadata collection 元数据集合

Private parameters

parameters: Map<number, ParameterMirror<any>> = ...

构造函数参数 此处的parameters.size数量是构造函数使用了ParameterMirror.createDecorator创建的装饰的成员数量, 要获取所有参数的数量,请使用方法 [new ClassMirror].getDesignParamTypes.

parentClassMirror

parentClassMirror: null | ClassMirror<any> = null

父ClassMirror

Private Readonly staticMembers

staticMembers: Map<string | symbol, MethodMirror<any, any> | PropertyMirror<any>> = ...

Static members 静态成员稽核

target

target: Object

target Mirror映射的目标

Methods

getAllInstanceMembers

getAllMetadata

getAllMethods

getAllMirrors

  • getAllMirrors<T>(type: undefined | ClassConstructor<T>, isStatic?: boolean): T[]

getAllProperties

getDesignParamTypes

  • getDesignParamTypes<T>(): T[]

getInstanceMembers

getMetadata

getMethods

getMirror

  • getMirror<T>(mirrorKey: string | symbol, isStatic?: boolean): undefined | T

getMirrors

getParameter

getParameters

getProperties

getStaticMethods

getStaticProperties

removeMirror

  • removeMirror(mirrorKey: string | symbol, isStatic?: boolean): void
  • 移除一个Mirror, 不含父类(基类)中的实例成员 Remove mirror

    Parameters

    • mirrorKey: string | symbol
    • isStatic: boolean = false

    Returns void

setMirror

  • setMirror<T>(mirrorKey: string | symbol, mirror: T, isStatic?: boolean): void
  • 添加 mirror,只在当前类中添加

    Type parameters

    Parameters

    • mirrorKey: string | symbol
    • mirror: T

      DeclarationMirror

    • isStatic: boolean = false

      是否为静态成员 使用该方法可以添加一个Mirror 可以是 MethodMirror 也可以是 PropertyMirror, ParameterMirror不应添加至此处,ParameterMirror属于。 MethodMirror管理.

    Returns void

setParameter

Static createDecorator

  • createDecorator(classMetadata: ClassMetadata<any>): ClassDecorator

Static isStaticMember

  • isStaticMember<T>(target: T, propertyKey: string | symbol): boolean
  • 判断target的静态成员中是否包含propertyKey

    Type parameters

    • T: Object

    Parameters

    • target: T
    • propertyKey: string | symbol

    Returns boolean

Static reflect