Answer:
The sentence is an example of: pun.
Step-by-step explanation:
A pun is a word play or joke that uses either words that have multiple meanings or words that sound alike but present different meanings. In this case, the pun consists of the use of "ham". If a person is a ham, that person is exaggerated in their manners in order to draw people's attention to himself. In the sentence, the person who is a ham is a pig farmer, and that is why we have a pun. We would not expect the pig farmer to be the ham - the pigs should be the ham (literally). Thus, the sentence plays with the figurative and the literal meanings of "ham".