Tom, for example, upset Roy in class (8)
I believe the answer is:
category
'class' is the definition.
('category' can be a synonym of 'class')
'tom for example upset roy' is the wordplay.
'tom' becomes 'cat' (I have seen 'A tom ' mean 'cat' so perhaps 'tom' could also mean 'cat').
'for example' becomes 'eg' ('e.g.' can be a synonym of 'for example').
'upset' is an anagram indicator.
'roy' is an anagram of 'ory'.
'cat'+'eg'+'ory'='CATEGORY'
'in' acts as a link.
(Other definitions for category that I've seen before include "Logical grouping" , "Type" , "Classification of grey-coat" , "Class of grey-coat" , "Kind" .)