The relation between dictionary and contextual meanings may be maintained along different lines: on the principle of affinity, on that of proximity, or symbol - referent relations, or on opposition. Thus the stylistic device based on the first principle is metaphor, on the second - metonymy, and on the third - irony.
Metaphor is a relation between the dictionary and contextual logical meanings based on the affinity or similarity of certain properties or features of the two corresponding concepts: "He smelled the ever-beautiful smell of coffee imprisoned in the can".
Metaphor can be embodied in all the meaningful parts of speech, in nouns, adjectives, verbs, adverbs and sometimes even in the auxiliary parts of speech, as in prepositions.
Metaphor as any stylistic device may be classified according to the degree of unexpectedness. Thus metaphors which are absolutely unexpected and quite unpredictable are called genuine metaphors: Through the open window the dust danced and was golden. Those which are commonly used in speech and are sometimes fixed in the dictionaries as expressive means of language are trite or dead metaphors: a flight of fancy, floods of tears.
Trite metaphors are sometimes injected with new vigour; their primary meaning is re-established alongside the new derivative meaning. Such metaphors are called sustained or prolonged. Stylistic function of a metaphor is to make the description concrete, to express the individual attitude.
Metonymy is based on a different type of relation between the dictionary and contextual meanings, a relation based not on affinity, but on some kind of association connecting the two concepts which these meanings represent.
Many attempts have been made to classify the types of relation which metonymy is based on. Among them the following are most common:
1) a concrete thing used instead of an abstract notion; in this case a thing becomes a symbol of the notion: The sword (Instead of war) is the worst argument in a situation like this;
2) the container instead of the thing contained: May I have another plate; He drank one more cup;
3) the material instead of the thing made if it: This silk fits you perfectly;
4) the instrument the doer uses in performing the action instead of the action or the doer himself: His pen is rather sharp;
5) the relation of proximity: The round game table was boisterous and happy (Ch. Dickens).
A type of metonymy namely, the one, which is based on the relations between the part and the whole - is often viewed independently as synecdoche.
"My brass will call vow brass," says one of the characters of A. Hailey's Airport to another, meaning "My boss will call your boss". The transference of names is caused by both bosses being officers, wearing uniform caps with brass cockades.
Irony is a stylistic device also based on the simultaneous realization of two logical meanings - dictionary and contextual, but the two meanings are in opposition to each other. The literal meaning is the opposite of the intended meaning. One thing is said and the other opposite is implied: Nice weather, isn't it? (on a rainy day). Here are some more examples:
"Last time it was a nice, simple, European-style war"; "Sonny Grosso was a warrior who looked for and frequently managed to find, the dark side of most situations ".