---
layout: docs
title: codegenUsesTrait
id: trait.Facebook.HackCodegen.CodegenFactoryTrait.codegenUsesTrait
docid: trait.Facebook.HackCodegen.CodegenFactoryTrait.codegenUsesTrait
permalink: /docs/reference/trait.Facebook.HackCodegen.CodegenFactoryTrait.codegenUsesTrait/
---
# Facebook\\HackCodegen\\CodegenFactoryTrait::codegenUsesTrait()




``` Hack
final public function codegenUsesTrait(
  string $name,
): Facebook\HackCodegen\CodegenUsesTrait;
```




## Parameters




- ` string $name `




## Returns




+ [` Facebook\HackCodegen\CodegenUsesTrait `](<class.Facebook.HackCodegen.CodegenUsesTrait.md>)