To make the shortcrust pastry, sift the flour into a large bowl, add the butter cut into cubes, and use your fingertips to rub them together until they resemble breadcrumbs.
Add the egg and water, and knead into a dough.
Cover the dough with a clingfilm and refrigerate for 20 minutes.
Use a rolling pin to roll the dough to a thickness of about half a centimetre.
Arrange the pastry over a tart dish, and use a fork to prick it it in several places.
Cover it with a non-stick paper, and fill the dish with dry pulses or ceramic baking beans.
Bake at 200 degrees Celsius (390 Fahrenheit) for 10 minutes, then remove the paper and pulses and bake for a further 10 minutes or until golden.
Spread the jam over the bottom of the pastry shell.
To make the custard, add the egg yolks, sugar and flour to a bowl and mix to get a thick paste.
Bring the milk to the boiling point, then pour it over the egg mixture, whisking continuously to avoid lumps forming.
Transfer the custard to the pan in which the milk boiled, and simmer until it thickens, whisking well.
Leave to cool slightly, then pour the custard over the jam.
Sprinkle the coconut over the custard, and decorate with cherries.
Refrigerate for at least 6 hours, ideally overnight.