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




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




## Parameters




* ` string $class `
* ` string $method `
* ` string $key `




## Returns




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