* lookup metadata from a target object and its prototype chain
(metadataKey: string, target: Object, propertyKey?: string)
| 42 | * lookup metadata from a target object and its prototype chain |
| 43 | */ |
| 44 | getMetadata(metadataKey: string, target: Object, propertyKey?: string): any { |
| 45 | metadataKey = this.getMetadataKey(metadataKey); |
| 46 | if (propertyKey) { |
| 47 | return Reflect.getMetadata(metadataKey, target, propertyKey); |
| 48 | } |
| 49 | return Reflect.getMetadata(metadataKey, target); |
| 50 | } |
| 51 | |
| 52 | /** |
| 53 | * get own metadata for a target object or it's property/method |