---
lang: en
title: 'API docs: metadata.metadataaccessor'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/metadata
permalink: /doc/en/lb4/apidocs.metadata.metadataaccessor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [MetadataAccessor](./metadata.metadataaccessor.md)

## MetadataAccessor class

A strongly-typed metadata accessor via reflection

**Signature:**

```typescript
export declare class MetadataAccessor<T, D extends DecoratorType = DecoratorType> 
```

## Properties

<table><thead><tr><th>

Property


</th><th>

Modifiers


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

[key](./metadata.metadataaccessor.key.md)


</td><td markdown="1">

`readonly`


</td><td markdown="1">

string


</td><td markdown="1">


</td></tr>
</tbody></table>

## Methods

<table><thead><tr><th>

Method


</th><th>

Modifiers


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

[create(key)](./metadata.metadataaccessor.create.md)


</td><td markdown="1">

`static`


</td><td markdown="1">

Create a strongly-typed metadata accessor


</td></tr>
<tr><td markdown="1">

[toString()](./metadata.metadataaccessor.tostring.md)


</td><td markdown="1">


</td><td markdown="1">


</td></tr>
</tbody></table>


