A printer caught with two large kitchen knives claimed he had them for his own protection after he had been stabbed in the head and left with a large gash a few weeks earlier.
Dylan Mahon (22) told gardai he was not fighting with anyone, and was carrying the knives in case anything happened to him or his cousin.
Judge Patricia McNamara ordered a pre-sentence rep- ort to see if Mahon was suit- able for the restorative justice programme and adjourned sentencing to October.
The judge said Mahon should also bring a medical report of his head injuries to court on that date.
Mahon admitted before Tall-aght District Court to possession of two large kitchen knives at The Square Shopping Centre car park on April 13.
Sgt Michael Ahern said gardai went to the scene at around 3.30am after a shop alarm went off.
He said the officers encountered Mahon, who had two kitchen knives, a carving knife and a bread knife, both with blades of between 20 and 25cm long.
The court heard that the defendant, of Brookview Park, Tallaght, has no previous convictions.
A defence barrister said that Mahon had the knives not with the intention of harming anyone, but to prevent others harming him.
He said he had been stabbed in the head a few weeks before this incident and suffered a large gash.
The lawyer said the attack has had a major impact on Mahon's feeling of security, and he was carrying the knives for his own safety.
He also said Mahon is doing much better and is now living with his girlfriend, a trainee social worker, who has been "a very positive influence" on him.
The court further heard that Mahon had been employed in a printing company but was forced to give up work because of the head injuries he received when he was stabbed.