`HeaderFile.addBasicMethods` should be in an API hook of the generate command. This code is very specific and has nothing to do with a generic solution.