CAP168 Aerodrome Licensing Chapter 3 Physical Characteristics.
There's a table (3.1)which will help you. 4E is actually a runway length figure and an a/c wingspan / gear width letter.
You're right that a Treb is a Code E a/c as is the 747, A340 and MD-11. The A380 is a code F.
A code 4 runway is longer than 1800m.
I've searched the UK AIP and found it easy to work out the runway code but how anyone works out whether a particular code a/c can be operated into an airport with a variety of different taxiways, I don't know.