---
lang: en
title: 'API docs: metadata.decoratorfactory.gettargetname'
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.decoratorfactory.gettargetname.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/metadata](./metadata.md) &gt; [DecoratorFactory](./metadata.decoratorfactory.md) &gt; [getTargetName](./metadata.decoratorfactory.gettargetname.md)

## DecoratorFactory.getTargetName() method

Get the qualified name of a decoration target.

**Signature:**

```typescript
static getTargetName(target: Object, member?: string | symbol, descriptorOrIndex?: TypedPropertyDescriptor<any> | number): string;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

target


</td><td markdown="1">

Object


</td><td markdown="1">

Class or prototype of a class


</td></tr>
<tr><td markdown="1">

member


</td><td markdown="1">

string \| symbol


</td><td markdown="1">

_(Optional)_ Optional property/method name


</td></tr>
<tr><td markdown="1">

descriptorOrIndex


</td><td markdown="1">

TypedPropertyDescriptor&lt;any&gt; \| number


</td><td markdown="1">

_(Optional)_ Optional method descriptor or parameter index


</td></tr>
</tbody></table>

**Returns:**

string

## Remarks

Example of target names:

- class MyClass - MyClass.constructor\[0\] // First parameter of the constructor - MyClass.myStaticProperty - MyClass.myStaticMethod() - MyClass.myStaticMethod\[0\] // First parameter of the myStaticMethod - MyClass.prototype.myProperty - MyClass.prototype.myMethod() - MyClass.prototype.myMethod\[1\] // Second parameter of myMethod


