Moved definition of addClassOpen, addClassBody and addClassClose into abstract methods of AbstractOMBuilder

See below for reason.