---
layout: docs
title: codegenClass
id: interface.Facebook.HackCodegen.ICodegenFactory.codegenClass
docid: interface.Facebook.HackCodegen.ICodegenFactory.codegenClass
permalink: /docs/reference/interface.Facebook.HackCodegen.ICodegenFactory.codegenClass/
---
# Facebook\\HackCodegen\\ICodegenFactory::codegenClass()




Create a class




``` Hack
public function codegenClass(
  string $name,
): Facebook\HackCodegen\CodegenClass;
```




## Parameters




* ` string $name `




## Returns




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