(To Be) Hoist By Your Own Petard

What does the idiom “(To Be) Hoist By Your Own Petard” mean?

Definition:

To be hurt by one’s own aggressive plans

For example:

“The dean implemented a foreign-language requirement for faculty, but then he couldn’t pass it himself. He was hoist by his own petard! “

Notes:

This idiom comes from Shakespeare.