As you might expect of Shakespeare, literary devices abound in this play. In Portia's famous speech about mercy, given when she is disguised as a male lawyer, she uses a metaphor, or comparison, likening mercy to a gentle rain that is undeserved but blesses and nurtures what it falls upon. She further uses an aphorism, or short, pithy phrase, to sum up mercy: "It blesseth him who gives and him who takes."
The courtroom scene uses dramatic irony, which is the literary device in which the audience knows something the characters in the play do not. This is a favorite technique of Shakespeare's. Here, the audience knows the lawyer is Portia, but the characters do not.
If we look at one more quote, we can find more literary devices:
All that glisters is not gold, Often have you heard that told; Many a man his life hath sold But my outside to behold: Gilded tombs do worms infold (II, vii)
The opening line uses alliteration, which is to use a consonant repeatedly for emphasis. The "g" in glisters and gold helps us remember the contrast between glisters and gold and thus the contrast between outer show (glister) and real worth (gold). The passage also employs rhyme: told, sold, behold and infold, which helps us to remember the important thematic point that money isn't everything. Shakespeare also uses imagery to paint a vivid contrast between a shining, gilded tomb and the worms within it. This imagery also uses the device of juxtaposition of two sharply contrasting images, in this case gilt and worms.
Consider the first two lines of the play:
Antonio. In sooth, I know not why I am so sad:
alliteration in the repeated "s" sounds
assonance in the repeated long "o" and long "i" sounds
It wearies me; you say it wearies you;
rhetorical balance, signalled by the semicolon
- The three caskets that Portia must put out for the suitors are certainly symbolic.
- In a sense Shylock is symbolic of the unethical jewish moneylenders and merchants of Venice
- Portia makes a pun of the word "will" in her conversation to her waiting woman, Nerissa,
...so is the will of a living daughter curbed by the will of a dead father. (I.ii.24-25).
- Allusion is used. In Act I, Scene I, for instance, Salerio, a friend of Antonio refers to "two-headed Janus," a Roman god of entrances and all beginnings (l.50) Also, in this scene, Gratiano alludes to a Greek oracle when he says,"I am a sir Oracle."
- Parallelism is used in Act 2, Scene 6 as Lorenzo declares,
For she is wise, if I can judge of her;
And fair she is, if that mine eyes be true;
And true she is, as she hath prov'd herself;(ll.53-55)
- Metaphor is used in Act 3, Scene 5 as Lorenzo says, "An army of good words" suggesting how words can be subject to multiple interpretations.