@loopback/docs
Version:
Documentation for LoopBack 4
37 lines (24 loc) • 1.21 kB
Markdown
lang: en
title: 'API docs: metadata.metadatainspector.getclassmetadata'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.metadatainspector.getclassmetadata.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/metadata](./metadata.md) > [MetadataInspector](./metadata.metadatainspector.md) > [getClassMetadata](./metadata.metadatainspector.getclassmetadata.md)
## MetadataInspector.getClassMetadata() method
Get the metadata associated with the given key for a given class
<b>Signature:</b>
```typescript
static getClassMetadata<T>(key: MetadataKey<T, ClassDecorator>, target: Function, options?: InspectionOptions): T | undefined;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| key | <code>MetadataKey<T, ClassDecorator></code> | Metadata key |
| target | <code>Function</code> | Class that contains the metadata |
| options | <code>InspectionOptions</code> | Options for inspection |
<b>Returns:</b>
`T | undefined`