---
layout: docs
title: addClass
id: class.Facebook.HackCodegen.CodegenFile.addClass
docid: class.Facebook.HackCodegen.CodegenFile.addClass
permalink: /docs/reference/class.Facebook.HackCodegen.CodegenFile.addClass/
---
# Facebook\\HackCodegen\\CodegenFile::addClass()




``` Hack
public function addClass(
  Facebook\HackCodegen\CodegenClassish $class,
): this;
```




## Parameters




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




## Returns




- ` this `