This could be done in a static initializer and the result stored in a static property.

1) The classes will be available at the time the static initializer is executed (Alternatively the property could be set lazily)
2) The value will not change throughout the runtime