Refactored APF generator to builder pattern for instructions

This commit refactors the APF generator to utilize the builder pattern
when adding instructions. This approach leads to a reduction in code
duplication.

Bug: 293811969
Test: TH
Change-Id: I0eb4474dbd3cbdeccf39d9aafb6c6604a0c4df40
1 file changed