(1)No court shall impose detention on a person under twenty-one years of age, unless the court is of opinion that no other method of dealing with him is appropriate.
(2)For the purpose of determining in pursuance of the provisions of subsection (1) of (this section whether any other method of dealing with a person mentioned therein is appropriate, the court shall obtain information about that person's circumstances from a probation officer or otherwise and shall consider that information ; and the court shall take into account any information before it which is relevant to his character and to his physical and mental condition.
(3)Where a court of summary jurisdiction imposes detention on an offender under twenty-one years of age, the court shall state the reason for its opinion that no other method of dealing with him is appropriate, and the reason shall be entered in the record of the proceedings along with the finding and sentence.
(4)Where, after the commencement of this section, in the case of a person who is of or over seventeen years of age but less than twenty-one years of age the court is of opinion as aforesaid, and either—
(a)if the person has been convicted of an offence punishable with imprisonment, is satisfied, having considered all the circumstances of the case, that neither a sentence of borstal training nor a sentence of detention in a detention centre should be imposed ; or
(b)would have power but for the said commencement to impose imprisonment otherwise than by sentence;
it shall, subject to the following provisions of this Act, instead of imposing a term of imprisonment upon him impose detention in a young offenders institution for a term not exceeding the term for which he could have been imprisoned.