In reply to:

In a moment I had become aware that we were swine cast before a pearl."



wwh quotes this phrase below the equator.


This is such a lovely rhetorical turn that we may have discussed and I simply was not a good enough student and didn't learn what I should have, but...

What is it called rhetorically when we take a well-known expression and reverse it about? It's very clever, it's commonly used by politicians and comedians alike (and it could be argued that they are one and the same), so I would like to know what they are doing when they do it...