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




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




## Parameters




- ` string $class `
- ` string $method `




## Returns




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