* get own metadata for a target object or it's property/method
(
metadataKey: string,
target: Object,
propertyKey?: string,
)
| 53 | * get own metadata for a target object or it's property/method |
| 54 | */ |
| 55 | getOwnMetadata( |
| 56 | metadataKey: string, |
| 57 | target: Object, |
| 58 | propertyKey?: string, |
| 59 | ): any { |
| 60 | metadataKey = this.getMetadataKey(metadataKey); |
| 61 | if (propertyKey) { |
| 62 | return Reflect.getOwnMetadata(metadataKey, target, propertyKey); |
| 63 | } |
| 64 | return Reflect.getOwnMetadata(metadataKey, target); |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * Check if the target has corresponding metadata |