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




Append the entire declaration to a ` HackBuilder `




``` Hack
final public function appendToBuilder(
  Facebook\HackCodegen\HackBuilder $builder,
): Facebook\HackCodegen\HackBuilder;
```




This includes the keywords, interface declaraitons, etc - and the
body.




## Parameters




- [` Facebook\HackCodegen\HackBuilder `](<class.Facebook.HackCodegen.HackBuilder.md>)`` $builder ``




## Returns




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