Added new method to add last enum constant.

This is necessary if there are method declarations in the enum.