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




Get the name of the parent class, or ` null ` if there is none




``` Hack
public function getExtends(): ?string;
```




## Returns




- ` ?string `