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




``` Hack
final public function codegenGeneratedFromClass(
  string $class,
): Facebook\HackCodegen\CodegenGeneratedFrom;
```




## Parameters




+ ` string $class `




## Returns




* [` Facebook\HackCodegen\CodegenGeneratedFrom `](<class.Facebook.HackCodegen.CodegenGeneratedFrom.md>)