In the following passage from Chapter 2, the narrator uses a metaphor to better depict Tess's childlike innocence, as well as to foreshadow that this innocence will be lost:
Tess Durbeyfield at this time of her life was a mere vessel of emotion untinctured by experience.
Tess is likened to a vessel that is open to new experiences but also vulnerable. Experience has not yet entered into this "vessel" at the beginning of the novel, and no one protects her in her state of childish vulnerability. Class inequality and poverty both strip Tess of her childhood, violating her and permitting her to be violated. This violation—not only of Tess, but of all impoverished children and the entire working class—is something Hardy heavily criticizes in Tess of the D'Urbervilles.
From a stylistic perspective, it is crucial to note that the narrator precedes his metaphor with the phrase "at this time," suggesting that Tess will, at some point, acquire knowledge and experience that will "tincture" the vessel of her mind. Though the foreshadowing here is subtle, early comments like this lay the groundwork for the more overt foreshadowing in later passages, building anticipation in the mind of the reader as the narrator recounts the series of tragic events that make up young Tess's life.
At the beginning of Chapter 6, Tess reflects on a thorny rose that, affixed to her breast, pricks her and draws blood. She views this as a bad omen, and the narrator takes this moment to foreshadow the tragic events that will soon befall her:
[Tess] fell to reflecting again, and in looking downwards a thorn of the rose remaining in her breast accidentally pricked her chin. Like all the cottagers of Blackmoor Vale, Tess was steeped in fancies and prefigurative superstitions; she thought this an ill-omen—the first she had noticed that day.
There are many literary elements at play in this particular passage. The roses given to Tess by Alec symbolize his harmful, romantic intentions, as he's more likely to "prick" her and draw blood than to bring anything positive into her life. This injury foreshadows the more direct injury Alec will do to Tess later on in the novel, both directly—as he physically harms her when he rapes her—and indirectly, as he damages her chances of finding happiness and love in a married state. It is ironic that in this situation the rose pricking Tess is more of a red flag than Alec's suspicious behavior upon their first meeting. The combination of irony, metaphor, and foreshadowing highlight Tess's innocence and naiveté.