I see you have already provided the answer. I will just confirm it and explain it further.
Answer:
The figurative language being used in the line is an apostrophe.
Step-by-step explanation:
As a literary device, an apostrophe happens when the character speaks to an inanimate object, to an idea, or to someone who is either dead or absent at the moment. In the line we are analyzing here, Hamlet addresses "vengeance" as if it could hear him. "Vengeance" is an idea, but Hamlet is talking to it, letting it know what a sordid and cowardly person he is. Therefore, the line is an example of apostrophe.